summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lustre/llite/dir.c
diff options
context:
space:
mode:
authorHenri Doreau <henri.doreau@cea.fr>2016-09-18 16:37:53 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-19 09:44:03 +0200
commita6d879fd08cd904c3595c338bb7995680b1ead13 (patch)
treee44b88389b8b829abb3673e3a8687bef7d746f13 /drivers/staging/lustre/lustre/llite/dir.c
parenteb1ddc6724f8b5e7f8d0fe1b2e29327802fe0503 (diff)
staging: lustre: llite: Add ioctl to get parent fids from link EA.
Added LL_IOC_GETPARENT to retrieve the <parent_fid>/name(s) of a given entry, based on its link EA. This saves multiple calls to path2fid/fid2path. Merged with second later patch that does various cleanups. Avoid unneeded allocation. Get read-only attributes from the user getparent structure and write the modified attributes only, instead of populating a whole structure in kernel and copying it back. Signed-off-by: Thomas Leibovici <thomas.leibovici@cea.fr> Signed-off-by: Henri Doreau <henri.doreau@cea.fr> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3613 Reviewed-on: http://review.whamcloud.com/7069 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5837 Reviewed-on: http://review.whamcloud.com/12527 Reviewed-by: Ned Bass <bass6@llnl.gov> Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/dir.c')
-rw-r--r--drivers/staging/lustre/lustre/llite/dir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
index 234095ef606b..705de1ce185a 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -1562,6 +1562,8 @@ out_quotactl:
return rc;
case OBD_IOC_FID2PATH:
return ll_fid2path(inode, (void __user *)arg);
+ case LL_IOC_GETPARENT:
+ return ll_getparent(file, (void __user *)arg);
case LL_IOC_FID2MDTIDX: {
struct obd_export *exp = ll_i2mdexp(inode);
struct lu_fid fid;