Re: [fuse] When do writes to fuse fd block?

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

 



On Wed, Sep 19, 2018 at 7:03 PM, Nikolaus Rath <Nikolaus@xxxxxxxx> wrote:
> Hi,
>
> Are there any conditions under which a write to the fuse file descriptor
> may block?
>
> It seems to me that this should never be the case - except possibly when
> sending a FUSE_NOTIFY_INVAL_ENTRY or FUSE_NOTIFY_DELETE request that is
> related for to an ongoing file system operation. Here would would much
> appreciate if someone could clarify what operations exactly would cause
> the write to block.

NOTIFY_INVAL_ENTRY and NOTIFY_DELETE lock the parent directory
i_mutex.  Operations which run under i_mutex of parent are:  lookup,
symlink, mknod, mkdir, unlink, rmdir, rename, link, create, rename2.
Operations which run under i_mutex of object: setattr, unlink, rmdir,
rename, setxattr, removexattr, readdir, readdirplus, rename2.

> Is it possible that the write blocks indefinitely
> because new related operations keep coming? Or will the kernel suspend
> sending any new related requests and just wait for the existing ones to
> terminate?

Shouldn't block indefinitely (lock does not allow starving), unless
there's a deadlock caused by calling the invalidate from an op that is
itself already holding i_mutex on the parent.

Thanks,
Miklos



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux