Thread (5 messages) 5 messages, 2 authors, 2011-02-01

Re: [patch] xfsprogs: repair never return if device removed

From: Ajeet Yadav <hidden>
Date: 2011-01-31 02:38:49

I did not receive and response / reviews on patch.

diff -Nurp xfsprogs/repair/sb.c xfsprogs-dirty/repair/sb.c
--- xfsprogs/repair/sb.c 2011-01-28 20:23:02.000000000 +0900

+++ xfsprogs-dirty/repair/sb.c 2011-01-28 20:21:06.000000000 +0900
@@ -122,8 +122,9 @@ find_secondary_sb(xfs_sb_t *rsb)
done = 1;

}

- if (!done && (bsize = read(x.dfd, sb, BSIZE)) == 0) {

+ if (!done && (bsize = read(x.dfd, sb, BSIZE)) <= 0) {

done = 1;

+ do_warn(_("Couldn't find candidate secondary superblock, exiting...\n"));

}

do_warn(".");

On Fri, Jan 28, 2011 at 8:31 PM, Ajeet Yadav [off-list ref]wrote:
xfsprogs all version, delete primary superblock of xfs partition

dd if=/dev/zero of=/dev/sda1 bs=512 count=1
sync

Run xfs_repair in partition, while its searching for secondary superblock,
remove the disk (USB) xfs_repair will never exit and will loop in never
ending ............

Please find patch attached with mail
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help