[Gluster-devel] Bug in posix.c:ensure_file_type()
Filipe Maia
filipe at xray.bmc.uu.se
Thu Jan 22 13:11:40 UTC 2009
Hi,
I've found another bug related to symlinks on the posix translator.
In ensure_file_type a stat(2) is made instead of lstat(2).
This causes the following error messages:
2009-01-22 10:49:24 C [posix.c:2841:ensure_file_type] ns-disk: entry
/raid/ns/filipe/hdfview is a different type of file than expected
Or
2009-01-22 11:11:14 C [posix.c:2833:ensure_file_type] ns-disk: stat
failed while trying to make sure entry
/raid/ns/michiel/.DCOPserver_jorn_:0 is a directory: No such file or
directory
for dangling links.
I'm not exactly sure of the side-effects though.
Patch against 2.0.0rc1:
--- posix.c.old 2009-01-22 13:56:12.240486670 +0100
+++ posix.c 2009-01-22 13:56:20.826876427 +0100
@@ -2825,7 +2825,7 @@
int op_ret = 0;
int ret = -1;
- ret = stat (pathname, &stbuf);
+ ret = lstat (pathname, &stbuf);
if (ret == -1) {
op_ret = -errno;
gf_log (this->name, GF_LOG_CRITICAL,
Filipe
More information about the Gluster-devel
mailing list