| To: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [RFC] add FIEMAP ioctl to efficiently map file allocation |
| From: | Anton Altaparmakov <aia21@xxxxxxxxx> |
| Date: | Fri, 13 Apr 2007 12:38:58 +0100 |
| Cc: | linux-ext4@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx |
| In-reply-to: | <20070413101507.GA11406@infradead.org> |
| References: | <20070412110550.GM5967@schatzie.adilger.int> <20070413101507.GA11406@infradead.org> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
On 13 Apr 2007, at 11:15, Christoph Hellwig wrote:
On Thu, Apr 12, 2007 at 05:05:50AM -0600, Andreas Dilger wrote: Would it not be better to allow people to get a file descriptor on the xattr fork and then just run the normal FIEMAP ioctl on that file descriptor? I.e. "openat(base file descriptor, O_STREAM, streamname)" or O_XATTR or whatever... An alternative API would be to provide a "getxattrfd ()/fgetxattrfd()" call or similar that would instead of returning the value of an xattr return an fd to it. Then you do not need to modify openat() at all... Interface doesn't bother me, just some ideas... And for XFS you would define a magic streamname or xattrname (or whatever you want to call it) of say "com.sgi.filesystem.xfs.xattrstream" (or .xattrfork) or something and then XFS would intercept that and know what to do with it... Such an interface could then be used by NTFS named streams and other file systems providing such things... (Yes I know I will now totally get flamed about named streams not being wanted in Linux and crap like that but that is exactly what you are asking for except you want to special case a particular stream using a flag instead of calling it for what it really is and once you start doing that you might as well allow full named streams...) You can just see named streams as an alternative, non-atomic API to xattrs if you like, i.e. you can either use the atomic xattr API provided in Linux already or you can get a file descriptor to an xattr and then use the normal system calls to access it non- atomically thus you can use the FIEMAP ioctl also. (-: FWIW this two-API approach to xattrs/named streams is the direction OSX is heading towards also so it is not without precedent and Windows has had both APIs for many years. And Solaris has the "openat (O_XATTR)" interface so that is not without precedent either. Best regards, Anton PS. to all flamers: I am going to delete any non-technical flames without replying so please do us all a favour and don't bother... Thanks. -- Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer, http://www.linux-ntfs.org/ |
| Previous by Date: | Re: [RFC] add FIEMAP ioctl to efficiently map file allocation, Christoph Hellwig |
|---|---|
| Next by Date: | Re: [RFC] add FIEMAP ioctl to efficiently map file allocation, Jeff Mahoney |
| Previous by Thread: | Re: [RFC] add FIEMAP ioctl to efficiently map file allocation, Christoph Hellwig |
| Next by Thread: | Re: [RFC] add FIEMAP ioctl to efficiently map file allocation, Nicholas Miell |
| Indexes: | [Date] [Thread] [Top] [All Lists] |