On Saturday 03 October 2009 06:11:55 Ryusuke Konishi wrote:
> Well, I guess the corruption didn't come from data loss on the md
> layer. OTOH, there is a possibility that md behavior has affected
> nilfs.
>
> Could you confirm if the following patch makes a difference?
>
> This patch doesn't recover corrupted file system, so you need a new
> file system. But, this can prevent the directory corruption if it
> came from bio allocation errors on write path.
>
> The patch was already merged at 2.6.32-rc1 but not yet backported
> to 2.6.31.y and 2.6.30.y.
>
> If the patch is confirmed to have effect on your problem, I will send
> it to -stable trees.
>
> Thanks,
> Ryusuke Konishi
>
> diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c
> index 9e3fe17..e6d9e37 100644
> --- a/fs/nilfs2/segbuf.c
> +++ b/fs/nilfs2/segbuf.c
> @@ -316,10 +316,10 @@ static struct bio *nilfs_alloc_seg_bio(struct
> super_block *sb, sector_t start, {
> struct bio *bio;
>
> - bio = bio_alloc(GFP_NOWAIT, nr_vecs);
> + bio = bio_alloc(GFP_NOIO, nr_vecs);
> if (bio == NULL) {
> while (!bio && (nr_vecs >>= 1))
> - bio = bio_alloc(GFP_NOWAIT, nr_vecs);
> + bio = bio_alloc(GFP_NOIO, nr_vecs);
> }
> if (likely(bio)) {
> bio->bi_bdev = sb->s_bdev;
>
Thank you for patch. I have install it just now and reformat /dev/md4.
Is it planned some fsck tool? I can help with tests if necessary.
Yuri.
_______________________________________________
users mailing list
[email protected]
https://www.nilfs.org/mailman/listinfo/users