[patch] xfsprogs: repair never return if device removed
Ajeet Yadav
ajeet.yadav.77 at gmail.com
Sun Jan 30 20:41:16 CST 2011
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 <ajeet.yadav.77 at gmail.com>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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://oss.sgi.com/pipermail/xfs/attachments/20110131/77ad227f/attachment.htm>
More information about the xfs
mailing list