All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe CHATAIGNON <liste-ZXOCcuNttmoBe96aLqz0jA@public.gmane.org>
To: Ryusuke Konishi <ryusuke-sG5X7nlA6pw@public.gmane.org>
Cc: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org
Subject: Re: Bug : reuse same inode
Date: Sat, 19 Feb 2011 16:26:09 +0100	[thread overview]
Message-ID: <20110219162609.6d9318fa@micro24> (raw)
In-Reply-To: <20110219.222232.05855196.ryusuke-sG5X7nlA6pw@public.gmane.org>

> I found GC never causes such interference.  So, the inode corruption
> was not caused neither by the snapshot mount nor GC.
> 
> Now, I'm suspecting a race condition between the removal of
> "f3_20110123_223247.ts" and creation of
> "f5_20110125_202053.ts(0).Xcl".
> 
> Even though "f3_20110123_223247.ts" was removed at cp14522 (2011-01-25
> 20:29:09) from the "capture" directory, it seems like actual removal
> of the inode happened a bit later than that since the file size was
> pretty big.

On my computer, deletion of a .ts file takes ~ 4-6 seconds (~1s/1G).
It may happend that a *.Xcl file is created during this time.

I make a little test with that fs. During the deletion of the file
f3_20110107_205154.ts (inode 16), in a another console, I touch
a file about every second :

The result :
19 -rw-r--r-- 1 philippe users    0 19 févr. 14:54 test1
20 -rw-r--r-- 1 philippe users    0 19 févr. 14:54 test2
22 -rw-r--r-- 1 philippe users    0 19 févr. 14:55 test3
23 -rw-r--r-- 1 philippe users    0 19 févr. 14:55 test4
16 -rw-r--r-- 1 philippe users    0 19 févr. 14:55 test5

test1, 2, 3, 4 were created instantaneously while the ts file was
deleting. But not test5 : touch command waits ~ 2-3 seconds until the rm
was finished on the other console. It has the same inode that the
deleted file. At final, filesystem seems OK but this time zone where
the created file reuse the old inode during a file deletion seems a good
candidate for race condition.

I ask myself : is it mandatory to reuse inode number in nilfs design ? 

> OK, but, please resend me the checkpoint list you pasted last week
> before reusing the disk.  The list looks like expired on the web
> (sorry, it's missing on my PC).

Here is the same checkpoint list that I pasted last week (not the
actual) with no expiration time : http://dpaste.org/UmEb/

In fact, I will keep this partition and continue to use it. So I delete
the 2 files that share the same inode (cf. my first mail). For the 2nd
rm, I have the message :
NILFS warning (device dm-0): nilfs_do_unlink: deleting nonexistent file
(14), 0

I touch some files after that :
14 -rw-r--r-- 1 philippe users    0 19 févr. 14:58 test6
24 -rw-r--r-- 1 philippe users    0 19 févr. 14:58 test7
25 -rw-r--r-- 1 philippe users    0 19 févr. 14:59 test8

Filesystem seems OK and I will send a new mail if new trouble appears.
Thanks for your help,

Regards,

PhC
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2011-02-19 15:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-06 19:09 Bug : reuse same inode Philippe CHATAIGNON
2011-02-07  4:02 ` Ryusuke Konishi
     [not found]   ` <20110207.130214.221723444.ryusuke-sG5X7nlA6pw@public.gmane.org>
2011-02-07 19:42     ` Philippe CHATAIGNON
2011-02-08 11:42       ` Ryusuke Konishi
     [not found]         ` <20110208.204230.73657026.ryusuke-sG5X7nlA6pw@public.gmane.org>
2011-02-08 20:32           ` Philippe CHATAIGNON
2011-02-10  5:01             ` Ryusuke Konishi
     [not found]               ` <20110210.140105.33383103.ryusuke-sG5X7nlA6pw@public.gmane.org>
2011-02-10 22:32                 ` Philippe CHATAIGNON
2011-02-18  7:21                   ` Ryusuke Konishi
     [not found]                     ` <20110218.162145.57461053.ryusuke-sG5X7nlA6pw@public.gmane.org>
2011-02-18 19:57                       ` Philippe CHATAIGNON
2011-02-19 13:22                         ` Ryusuke Konishi
     [not found]                           ` <20110219.222232.05855196.ryusuke-sG5X7nlA6pw@public.gmane.org>
2011-02-19 15:26                             ` Philippe CHATAIGNON [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110219162609.6d9318fa@micro24 \
    --to=liste-zxoccunttmobe96alqz0ja@public.gmane.org \
    --cc=konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org \
    --cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ryusuke-sG5X7nlA6pw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.