Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1611266 > unrolled thread
| Started by | Fabian Frederick <fabf@skynet.be> |
|---|---|
| First post | 2017-03-28 20:20 +0200 |
| Last post | 2017-03-29 14:20 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1 linux-next] befs: make export work with cold dcache Fabian Frederick <fabf@skynet.be> - 2017-03-28 20:20 +0200
Re: [PATCH 1/1 linux-next] befs: make export work with cold dcache Luis de Bethencourt <luisbg@osg.samsung.com> - 2017-03-28 21:40 +0200
Re: [PATCH 1/1 linux-next] befs: make export work with cold dcache Luis de Bethencourt <luisbg@osg.samsung.com> - 2017-03-29 14:20 +0200
| From | Fabian Frederick <fabf@skynet.be> |
|---|---|
| Date | 2017-03-28 20:20 +0200 |
| Subject | [PATCH 1/1 linux-next] befs: make export work with cold dcache |
| Message-ID | <tq3SO-37G-17@gated-at.bofh.it> |
based on commit b3b42c0deaa1
("fs/affs: make export work with cold dcache")
This adds get_parent function so that nfs client can still work after
cache drop (Tested on NFS v4 with echo 3 > /proc/sys/vm/drop_caches)
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
fs/befs/linuxvfs.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index c500e95..63e7c47 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -58,6 +58,7 @@ static struct dentry *befs_fh_to_dentry(struct super_block *sb,
struct fid *fid, int fh_len, int fh_type);
static struct dentry *befs_fh_to_parent(struct super_block *sb,
struct fid *fid, int fh_len, int fh_type);
+static struct dentry *befs_get_parent(struct dentry *child);
static const struct super_operations befs_sops = {
.alloc_inode = befs_alloc_inode, /* allocate a new inode */
@@ -93,6 +94,7 @@ static const struct address_space_operations befs_symlink_aops = {
static const struct export_operations befs_export_operations = {
.fh_to_dentry = befs_fh_to_dentry,
.fh_to_parent = befs_fh_to_parent,
+ .get_parent = befs_get_parent,
};
/*
@@ -667,6 +669,19 @@ static struct dentry *befs_fh_to_parent(struct super_block *sb,
befs_nfs_get_inode);
}
+static struct dentry *befs_get_parent(struct dentry *child)
+{
+ struct inode *parent;
+ struct befs_inode_info *befs_ino = BEFS_I(d_inode(child));
+
+ parent = befs_iget(child->d_sb,
+ (unsigned long)befs_ino->i_parent.start);
+ if (IS_ERR(parent))
+ return ERR_CAST(parent);
+
+ return d_obtain_alias(parent);
+}
+
enum {
Opt_uid, Opt_gid, Opt_charset, Opt_debug, Opt_err,
};
--
2.9.3
[toc] | [next] | [standalone]
| From | Luis de Bethencourt <luisbg@osg.samsung.com> |
|---|---|
| Date | 2017-03-28 21:40 +0200 |
| Message-ID | <tq58e-3Wt-29@gated-at.bofh.it> |
| In reply to | #1611266 |
On 28/03/17 19:16, Fabian Frederick wrote:
> based on commit b3b42c0deaa1
> ("fs/affs: make export work with cold dcache")
>
> This adds get_parent function so that nfs client can still work after
> cache drop (Tested on NFS v4 with echo 3 > /proc/sys/vm/drop_caches)
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
Cool!
I wrote something similar to this and then didn't got around to do
proper testing of it.
Will test your patch tomorrow and merge it if it is all good.
Thanks Fabian,
Luis
[toc] | [prev] | [next] | [standalone]
| From | Luis de Bethencourt <luisbg@osg.samsung.com> |
|---|---|
| Date | 2017-03-29 14:20 +0200 |
| Message-ID | <tqkJY-6K0-13@gated-at.bofh.it> |
| In reply to | #1611266 |
On 28/03/17 19:16, Fabian Frederick wrote:
> based on commit b3b42c0deaa1
> ("fs/affs: make export work with cold dcache")
>
> This adds get_parent function so that nfs client can still work after
> cache drop (Tested on NFS v4 with echo 3 > /proc/sys/vm/drop_caches)
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
>
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Hi Fabian,
I tested this and it looks to work well.
Merged it into my for-next branch [0].
Thanks,
Luis
[0] https://github.com/luisbg/linux-befs/commits/for-next
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web