Re: [PATCH -V4 2/6] vfs: Add name to file handle conversion support

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

 



On 2010-04-23, at 05:38, Aneesh Kumar K.V wrote:
> +long do_sys_name_to_handle(const char __user *name,
> +				struct file_handle *fh)
> +{
> +	/*
> +	 * name to handle conversion only done for regular files
> +	 * directories and symbolic links
> +	 */

Out of curiosity, why not do this for other types of files?  It makes sense from a consistency POV, so that the userspace code doesn't have to special-case each file by checking the type first (which would mean doing an extra path traversal and stat for each file first, adding overhead).

I'd always thought it would be cool to have a distributed filesystem where named pipes/sockets work across clients by using the IO transport of the filesystem, making single-system image environments a lot easier to implement.

> +	/* we ask for a non connected handle */
> +	retval = exportfs_encode_fh(path.dentry, (struct fid *)handle,
> +				&handle_size,  0);

Since there is virtually no overhead to do so, why not always return a connected handle?  This will allow the kernel to reconnect the looked-up dentries into the tree, instead of creating all disconnected dentries.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

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