From d3e3b7eac886fb1383db2f22b81550fa6d87f62f Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 6 Jul 2017 15:50:27 +0100 Subject: afs: Add metadata xattrs Add xattrs to allow the user to get/set metadata in lieu of having pioctl() available. The following xattrs are now available: - "afs.cell" The name of the cell in which the vnode's volume resides. - "afs.fid" The volume ID, vnode ID and vnode uniquifier of the file as three hex numbers separated by colons. - "afs.volume" The name of the volume in which the vnode resides. For example: # getfattr -d -m ".*" /mnt/scratch getfattr: Removing leading '/' from absolute path names # file: mnt/scratch afs.cell="mycell.myorg.org" afs.fid="10000b:1:1" afs.volume="scratch" Signed-off-by: David Howells Signed-off-by: Linus Torvalds --- fs/afs/internal.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fs/afs/internal.h') diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 4e25566..82e1655 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -731,6 +731,11 @@ extern int afs_writeback_all(struct afs_vnode *); extern int afs_flush(struct file *, fl_owner_t); extern int afs_fsync(struct file *, loff_t, loff_t, int); +/* + * xattr.c + */ +extern const struct xattr_handler *afs_xattr_handlers[]; +extern ssize_t afs_listxattr(struct dentry *, char *, size_t); /*****************************************************************************/ /* -- cgit v1.1