[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gluster-devel] NULL loc in posix_acl_truncate
From: |
Emmanuel Dreyfus |
Subject: |
Re: [Gluster-devel] NULL loc in posix_acl_truncate |
Date: |
Sun, 27 May 2012 07:17:51 +0200 |
User-agent: |
MacSOUP/2.7 (unregistered for 1954 days) |
Emmanuel Dreyfus <address@hidden> wrote:
> In frame 10, loc->path and loc->inode are NULL.
Here is the investigation so far:
xlators/features/locks/src/posix.c:truncate_stat_cbk() has a NULL
loc->inode, and this leads to the acl check that fails.
As I understand this is a FUSE implentation problem. fchmod() produces a
FUSE SETATTR. If the file is being written, NetBSD FUSE will set mode,
size, atime, mtime, and fh in this operation. I suspect Linux FUSE only
sets mode and fh and this is why the bug does not appear on Linux: the
truncate code path is probably not involved.
Can someone confirm? If this is the case, it suggests the code path may
have never been tested. I suspect there are bugs there, for instance, in
pl_truncate_cbk, local is erased after being retreived, which does not
look right:
local = frame->local;
local = mem_get0 (this->local_pool);
if (local->op == TRUNCATE)
loc_wipe (&local->loc);
I tried fixing that one without much improvments. There may be other
problems.
About fchmod() setting size: is it a reasonable behavior? FUSE does not
specify what must happens, so if glusterfs rely on the Linux kernel not
doing it may be begging for future bugs if that behavior change.
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
address@hidden