Re: [RFC] fl_owner_t and use of filp_close() in nfs4_free_lock_stateid()

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

 



On Tue, 11 Oct 2022 at 22:45, Jeff Layton <jlayton@xxxxxxxxxx> wrote:

> The NFS client maintains lock records in the local VFS.

This is what fuse does, unless server explicitly requests remote posix
locking with the FUSE_POSIX_LOCKS init flag.  Not sure how many real
fuse filesystem out there actually implement this, probably not a lot.

>  When a file is
> closed, the VFS issues a whole file unlock. You're probably getting
> bitten by this in locks_remove_posix:
>
>         ctx =  smp_load_acquire(&inode->i_flctx);
>         if (!ctx || list_empty(&ctx->flc_posix))
>                 return;
>
> Because FUSE doesn't set any locks in the local kernel, that final
> unlock never occurs.

Fuse doesn't care, because if remote posix locks are enabled, then
unlocking should be done in the FUSE_FLUSH request.

> There are a couple of options here: You could have FUSE start setting
> local lock records, or you could look at pushing the above check down
> into the individual ->lock ops.

I don't remember the details, but setting local locks wasn't a good option.

Thanks,
Miklos



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

  Powered by Linux