Re: [PATCH 5/6] clean up OCFS2 nlink handling
- From: Dave Hansen <haveblue@xxxxxxxxxx>
- Date: Thu, 10 Aug 2006 12:06:58 -0700
On Thu, 2006-08-10 at 09:07 +0100, Steven Whitehouse wrote:
On Wed, 2006-08-09 at 12:15 -0700, Dave Hansen wrote:
On Wed, 2006-08-09 at 18:12 +0100, Christoph Hellwig wrote:[snip]
did you look whether gfs2 in -mm needs something similar?
It doesn't appear to. It doesn't manipulate i_nlink in the same, direct
manner.
I think it will need something similar. I suspect the required changes
will all be confined to routines in inode.c. If the link count is
changed by (a) remote node(s), then gfs2_inode_attr_in() might change
the link count. Also gfs2_change_nlink() is the other place to look. I
think everywhere else is ok,
Well, I think this is all that it needs. I'm trying to decide if we
need a set_nlink() function for users like this, but I'm not sure there
are enough of them.
---
lxc-dave/fs/gfs2/inode.c | 3 +++
2 files changed, 3 insertions(+)
diff -puN fs/gfs2/inode.c~gfs fs/gfs2/inode.c
--- lxc/fs/gfs2/inode.c~gfs 2006-08-10 09:52:33.000000000 -0700
+++ lxc-dave/fs/gfs2/inode.c 2006-08-10 12:05:06.000000000 -0700
@@ -332,6 +332,9 @@ int gfs2_change_nlink(struct gfs2_inode
ip->i_di.di_ctime = get_seconds();
ip->i_inode.i_nlink = nlink;
+ if (!nlink)
+ ip->i_inode.i_state |= I_AWAITING_FINAL_IPUT;
+
gfs2_trans_add_bh(ip->i_gl, dibh, 1);
gfs2_dinode_out(&ip->i_di, dibh->b_data);
brelse(dibh);
-- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 5/6] clean up OCFS2 nlink handling
- From: Steven Whitehouse
- Re: [PATCH 5/6] clean up OCFS2 nlink handling
- References:
- [PATCH 0/6] read-only bind mount prep work
- From: Dave Hansen
- [PATCH 5/6] clean up OCFS2 nlink handling
- From: Dave Hansen
- Re: [PATCH 5/6] clean up OCFS2 nlink handling
- From: Christoph Hellwig
- Re: [PATCH 5/6] clean up OCFS2 nlink handling
- From: Dave Hansen
- Re: [PATCH 5/6] clean up OCFS2 nlink handling
- From: Steven Whitehouse
- [PATCH 0/6] read-only bind mount prep work
- Prev by Date: Re: [PATCH 0/5] Forking ext4 filesystem and JBD2
- Next by Date: Re: ext3 corruption
- Previous by thread: Re: [PATCH 5/6] clean up OCFS2 nlink handling
- Next by thread: Re: [PATCH 5/6] clean up OCFS2 nlink handling
- Index(es):
Relevant Pages
|