Re: [PATCH 5/6] clean up OCFS2 nlink handling



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/



Relevant Pages

  • Re: [PATCH 5/6] clean up OCFS2 nlink handling
    ... It doesn't manipulate i_nlink in the same, ... manner. ... I suspect the required changes ...
    (Linux-Kernel)
  • Re: bROWN remains subject of sex assault investigation
    ... in article 4d5b4pF18uoqiU1@xxxxxxxxxxxxxx, Terraholm at ... conclusion that he's a suspect for sexual assault since he's only attributed ... to be "involved" in some manner. ...
    (alt.sports.basketball.nba.la-lakers)
  • Re: OT at least they dont use waterboarding
    ... "criminals" in such a manner. ... I suspect most of you hardcore "war on terror" types would secretly ...
    (rec.gambling.poker)
  • Re: creating live virtual files by concatenation
    ... You say it like it's a bad thing, but in truth I suspect ... to manipulate through scripts, etc. ... plain text serial files are *easy*. ...
    (Linux-Kernel)
  • My printing woes!
    ... the need for very strong glasses. ... I suspect that because I have a large ... spreadsheet which extends from Column A through M, ... there a way to manipulate the page so that I can print it out (most likely on ...
    (microsoft.public.excel.misc)