[Top] [All Lists]

Re: [opensuse] nfs_update_inode: inode X mode changed, Y to Z

To: NeilBrown <neilb@xxxxxxx>
Subject: Re: [opensuse] nfs_update_inode: inode X mode changed, Y to Z
From: Timothy Shimmin <tes@xxxxxxx>
Date: Wed, 26 Mar 2008 14:27:26 +1100
Cc: "Josef 'Jeff' Sipek" <jeffpc@xxxxxxxxxxxxxx>, "J. Bruce Fields" <bfields@xxxxxxxxxxxx>, xfs@xxxxxxxxxxx, Adam Schrotenboer <adam@xxxxxxxxx>, Jesper Juhl <jesper.juhl@xxxxxxxxx>, Trond Myklebust <trond.myklebust@xxxxxxxxxx>, lkml@xxxxxxxxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, Thomas Daniel <tdaniel@xxxxxxxxx>, Frederic Revenu <frevenu@xxxxxxxxx>, Jeff Doan <jdoan@xxxxxxxxx>
In-reply-to: <34178.>
References: <47CF62C5.7000908@xxxxxxxxx> <18384.50909.866848.966192@xxxxxxxxxxxxxx> <9a8748490803121513w285cd45rb6b26a3d842cac1b@xxxxxxxxxxxxxx> <20080312221511.GC31632@xxxxxxxxxxxx> <9a8748490803121516u36395872i70cc88b0439adc74@xxxxxxxxxxxxxx> <18394.1501.991087.80264@xxxxxxxxxxxxxx> <47DAEFD0.9020407@xxxxxxxxx> <47E92F8E.7030504@xxxxxxxxx> <20080325190943.GF2237@xxxxxxxxxxxx> <32953.> <20080325212425.GA20257@xxxxxxxxxxxxxx> <34178.>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird (Macintosh/20080213)
Hi Neil,

NeilBrown wrote:
On Wed, March 26, 2008 8:24 am, Josef 'Jeff' Sipek wrote:

Unless you specify the "ikeep" mount option, XFS will remove unused inode
clusters.  The newly freed blocks can be then used to store data or
a new inode cluster.  If the blocks get reused for inodes, you'll end up
with inodes whose generation numbers regressed. (inode number = f(block

Using the "ikeep" mount option causes to _never_ free empty inode
This means that if you create many files and then unlink them, you'll end
with many unused inodes that are still allocated (and taking up disk
but free to be used by the next creat(2)/mkdir(2)/etc..

This "problem" is inherent to any file system which dynamically allocates

Yes, I understand all that.

However you still need to do something about the generation number.  It
must be set to something.

When you allocate an inode that doesn't currently exist on the device,
you obviously cannot increment the old value and use that.
However you can do a lot better than always using 0.

Yes, this is a known problem.
We came across it in about August last year I believe in the context of
DMF as it wants to keep persistent file handles with gen#s in them:
  SGI bug:
  969192: Default mount option "noikeep" makes the inode generation number 
I vaguely remember at the time that a number of different schemes were
tossed around but in the end we just turned off the ikeep
for DMAPI mounted filesystems.
I thought we had a bug open to do a real fix but can't see
it at the moment. Will look into it and discuss with our group.


<Prev in Thread] Current Thread [Next in Thread>