fuse does not show lock info in /proc/.../fdinfo/...

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

 



Hi Miklos,

fuse_file_lock() since its inception in 2006 implements F_SETLK command like this:

        if (fc->no_lock)
            err = posix_lock_file(file, fl, NULL);
        else
            err = fuse_setlk(file, fl, 0);

where fc->no_lock is a per-mount-point tunable. It would be more natural to posix-lock in both cases, like this:

        err = posix_lock_file(file, fl, NULL);
        if (!err && !fc->no_lock)
            err = fuse_setlk(file, fl, 0);

Otherwise, by default, when fc->no_lock=0, posix_lock_file() is never called, and from end-user perspective it is weird that the file was locked successfully, but "fdinfo" does not show the lock.

Do you think there were some reasons to implement it that way -- not calling posix_lock_file unconditionally?

Thanks,
Maxim
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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