Re: [RFC] FUSE: Notifying the kernel of deletion.

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

 



On 2011.09.26, at 19:08 , Miklos Szeredi wrote:

> John Muir <john@xxxxxxxxx> writes:
> 
>> Allows a FUSE file-system to tell the kernel when a file or directory is deleted. If the specified dentry has the specified inode number, the kernel will unhash it.
> 
> I like the patch mostly, you gave a lot attention to the details.
> 
> One thing I don't quite understand is the API.  Why is it necessary to
> send the child ID in addition to the parent ID and the name?  It looks
> like you are using it for sanity checking, but what exactly is the
> purpose?

Yes, a sanity-check, but also to avoid race conditions.

In my file-system's case (as discussed in another thread about invalidating inode file data) to avoid dead-lock between a kernel thread modifying the directory and the incoming remote operation, the delete notification is sent asynchronously to the kernel. Therefore, in theory modifications could be made to the directory structure between the deletion of the file, and processing of this notification.

Since deletion is a bit more permanent than 'invalidation', I added the sanity-check to make sure that the right entry is being deleted.

John.

--
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