diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/recipes-devtools/unfs3/unfs3/rename_fh_cache.patch | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-devtools/unfs3/unfs3/rename_fh_cache.patch')
-rw-r--r-- | poky/meta/recipes-devtools/unfs3/unfs3/rename_fh_cache.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/poky/meta/recipes-devtools/unfs3/unfs3/rename_fh_cache.patch b/poky/meta/recipes-devtools/unfs3/unfs3/rename_fh_cache.patch new file mode 100644 index 000000000..e6d89530f --- /dev/null +++ b/poky/meta/recipes-devtools/unfs3/unfs3/rename_fh_cache.patch @@ -0,0 +1,64 @@ +From: Jason Wessel <jason.wessel@windriver.com> +Date: Sat, 23 Feb 2013 08:49:08 -0600 +Subject: [PATCH] fh_cache: fix statle nfs handle on rename problem + +The following test case fails with modern linunx kernels which cache +the renamed inode. + + % mkdir a;mkdir b;mv b a/;ls -l a + ls: a/b: Stale NFS file handle + +The issue is that nfserver was not updating the fh_cache with the new +location of the inode, when it moves directories. + +Signed-off-by: Jason Wessel <jason.wessel@windriver.com> + +Upstream-Status: Submitted http://sourceforge.net/p/unfs3/bugs/5/ + +--- + fh_cache.c | 12 ++++++++++++ + fh_cache.h | 1 + + nfs.c | 2 ++ + 3 files changed, 15 insertions(+) + +--- a/fh_cache.c ++++ b/fh_cache.c +@@ -199,6 +199,18 @@ static char *fh_cache_lookup(uint32 dev, + } + + /* ++ * update a fh inode cache for an operation like rename ++ */ ++void fh_cache_update(nfs_fh3 fh, char *path) ++{ ++ unfs3_fh_t *obj = (void *) fh.data.data_val; ++ backend_statstruct buf; ++ ++ if (backend_lstat(path, &buf) != -1) { ++ fh_cache_add(obj->dev, buf.st_ino, path); ++ } ++} ++/* + * resolve a filename into a path + * cache-using wrapper for fh_decomp_raw + */ +--- a/fh_cache.h ++++ b/fh_cache.h +@@ -19,5 +19,6 @@ unfs3_fh_t fh_comp(const char *path, str + unfs3_fh_t *fh_comp_ptr(const char *path, struct svc_req *rqstp, int need_dir); + + char *fh_cache_add(uint32 dev, uint64 ino, const char *path); ++void fh_cache_update(nfs_fh3 fh, char *path); + + #endif +--- a/nfs.c ++++ b/nfs.c +@@ -876,6 +876,8 @@ RENAME3res *nfsproc3_rename_3_svc(RENAME + res = backend_rename(from_obj, to_obj); + if (res == -1) + result.status = rename_err(); ++ /* Update the fh_cache with moved inode value */ ++ fh_cache_update(argp->to.dir, to_obj); + } + } + |