Re: [LSF/MM TOPIC] Network filesystem cache management system call

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

 



On 1/17/2017 11:49 AM, David Howells wrote:
> David Howells <dhowells@xxxxxxxxxx> wrote:
> 
>> AFS filesystem implementations like OpenAFS have a number of management calls
>> usually implemented through the pioctl() and afs() system calls.  However,
>> there is general revulsion to the idea of allowing these in Linux as they are
>> very much abused.
>>
>> Now, I need to come up with replacements for these.  For some I can use
>> getxattr()/setxattr(), for some keyrings and for others procfs/sysfs, but for
>> some I can't.
>>
>> One of these is the call to manage local caching on a file or volume.  This,
>> however, doesn't really need to be limited to AFS, but could also be
>> applicable to NFS, CIFS, etc. - and possibly even to local filesystems.
>>
>> A brainstorming session on this would be useful.

I would be happy to participate.


> Another thing that I would like to work out is how to do mountpoint management
> commands for kAFS.  This includes doing the following operations:
> 
>  (*) Creating a mountpoint.
> 
>  (*) Deleting a mountpoint
> 
>  (*) Reading a mountpoint.
> 
>  (*) Invalidating cached mountpoint information.
> 
> The problem here is that mountpoints are automatically mounted when you touch
> them unless you specify the AT_NO_AUTOMOUNT flag - and even then, that's
> ignored if the mountpoint is already mounted upon.
> 
> I could do this by saying that you have to open the parent directory of the
> mountpoint and do an ioctl() on it, but would it be better to have one or more
> syscalls for this purpose?

I am uncomfortable with opening the parent directory object because it
introduces object reference confusion when the path to the parent
directory is itself a symlink or a mount point.

Granted, the AFS3 protocol does not make this easy.

1. An AFS3 mount point is a special type of symlink

2. AFS3 does not provide a method by which a symlink's target can be
   altered or its type changed after it is created.

3. Legacy AFS3 clients have always exposed mount points to applications
   as a directory not a symlink.

If I had my preference, I would implement creating a mount point as:

1. create an empty file or symlink

2. open the resulting object and issue an ioctl against that object
   to set a mount point target which results in it becoming a mount
   point.

Deleting, Reading, Modifying, and Invalidating all are implemented as

1. open mount point

2. issue ioctl against object

Unfortunately, AFS3 simply doesn't provide the functionality I desire.
The best that could be done would be to implement a createMountPoint
ioctl which operates by deleting the open object and creating a new
mount point object in its place.  While dealing with the fact that the
AFS FID for the object object will change as a result.
> 
> Further, would this be of use to any other filesystems?

Could SMB use this as a method of defining referrals?

Jeffrey Altman


begin:vcard
fn:Jeffrey Altman
n:Altman;Jeffrey
org:AuriStor, Inc.
adr:Suite 6B;;255 West 94Th Street;New York;New York;10025-6985;United States
email;internet:jaltman@xxxxxxxxxxxx
title:Founder and CEO
tel;work:+1-212-769-9018
note;quoted-printable:LinkedIn: https://www.linkedin.com/in/jeffreyaltman=0D=0A=
	Skype: jeffrey.e.altman=0D=0A=
	
url:https://www.auristor.com/
version:2.1
end:vcard

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[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