[Gluster-devel] volume rebalance still broken

Emmanuel Dreyfus manu at netbsd.org
Wed Jun 29 13:32:17 UTC 2011


Emmanuel Dreyfus <manu at netbsd.org> wrote:

> client# cat old_file
> cat: old_file: Not a directory

I found the problem. Fortunately there are not many ENOTDIR return in
glusterfs sources, that helps a lot.

On NetBSD and FreeBSD, O_DIRECTORY does not exists and is defined as 0
by glusterfs. ((flags & O_DIRECTORY) == O_DIRECTORY) always evaluate
to true, and this is a bug. 

--- ./xlators/performance/quick-read/src/quick-read.c.orig
2011-04-13 10:02:38.000000000 +0200
+++ ./xlators/performance/quick-read/src/quick-read.c   2011-04-13
10:03:23.000000000 +0200
@@ -637,9 +637,9 @@
                 }
         }
         UNLOCK (&table->lock);
 
-        if (content_cached && ((flags & O_DIRECTORY) == O_DIRECTORY)) {
+        if (content_cached && (flags & O_DIRECTORY)) {
                 op_ret = -1;
                 op_errno = ENOTDIR;
                 goto unwind;
         }

Ironically, I already fixed that one when porting 3.1, and failed to
keep the patch for 3.2

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu at netbsd.org




More information about the Gluster-devel mailing list