From ec696b55976d0e04da5ba01798972eee54661b9a Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sat, 14 Aug 2010 21:09:40 +1000 Subject: [PATCH] Allow cleaner to skip new filesystems. If we can tell the a subset-filesystem is too new to match what we find in the write-cluster, we can skip it quickly. Signed-off-by: NeilBrown --- clean.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/clean.c b/clean.c index 115892e..d436a32 100644 --- a/clean.c +++ b/clean.c @@ -277,6 +277,20 @@ static void cleaner_parse(struct fs *fs, struct toclean *tc) ino_from_sb(ino->i_sb)->i_ino != fsnum) { if (ino) iput(ino); + if (fsnum) { + struct inode *fsino = + lafs_iget_fs(fs, 0, fsnum, ASYNC); + if (IS_ERR(fsino)) + ino = fsino; + else if (LAFSI(fsino)->md.fs.creation_age > tc->seq) { + /* skip this inode as filesystem + * is newer + */ + iput(fsino); + ino = NULL; + goto skip_inode; + } + } ino = lafs_iget_fs(fs, fsnum, inum, ASYNC); } if (!IS_ERR(ino)) { -- 2.39.5