[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <31934.1499357651@warthog.procyon.org.uk>
Date: Thu, 06 Jul 2017 17:14:11 +0100
From: David Howells <dhowells@...hat.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: dhowells@...hat.com, viro@...iv.linux.org.uk,
linux-fsdevel@...r.kernel.org, linux-api@...r.kernel.org,
torvalds@...ux-foundation.org, linux-afs@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] afs: Add metadata xattrs
Christoph Hellwig <hch@...radead.org> wrote:
> NAK. Don't overload xattrs with magic behavior just to avoid the need
> to do proper syscalls or ioctls.
How? This has to work on non-files, files you can't open and mountpoints.
You can't do an ioctl() on a file opened O_PATH:
if (unlikely(f->f_flags & O_PATH)) {
f->f_mode = FMODE_PATH;
f->f_op = &empty_fops;
return 0;
}
and you can't specify AT_NO_AUTOMOUNT or AT_NO_FOLLOW to openat(), so ioctl()
is of no use here.
Do you advocate introducing a pioctl() call? Linus was dead-set against that
as I recall.
I could invent a bunch of AFS-specific syscalls, but I'd rather not do that or
I suppose bring my fsinfo() patches up to scratch - but you didn't like those
either.
Note that using xattrs for fs info is not without precedent in Linux - cifs,
for example.
David
Powered by blists - more mailing lists