Re: volume rebalance still broken

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Emmanuel Dreyfus <manu@xxxxxxxxxx> 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@xxxxxxxxxx



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux