wipefs no longer shows or erases nilfs2 signatures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

wipefs is no longer able to show and erase nilfs2 file system
signatures.  Bisected this to commit:
    5f77ce6 libblkid: (nilfs2) check also backup superblock

Test case on Fedora 21:

# mkfs.nilfs2 /dev/sdb1
# wipefs -V
wipefs from util-linux 2.25.2
# wipefs /dev/sdb1
# wipefs -a /dev/sdb1

Test case on CentOS 7:

# mkfs.nilfs2 /dev/sdb1
# wipefs -V
wipefs from util-linux 2.23.2
# wipefs /dev/sdb1
offset               type
-----------------------------------------------------------------
0x406                nilfs2   [filesystem]
                     UUID:   74b7210c-f568-404f-b302-db0e0339182d
# wipefs -a /dev/sdb1
/dev/sdb1: 2 bytes were erased at offset 0x00000406 (nilfs2): 34 34


So commit 5f77ce6 looks to be about reading either the primary or backup
super block with the highest sequence/checkpoint number.  However with a
probe function and no magics wipefs isn't able to detect the file system
or clear the signature bytes.

Re-adding this to libblkid/src/superblocks/nilfs2.c:
        .magics = { { .magic="\x34\x34", .len=2, .kboff=1, .sboff=6},
                    { NULL }
                  }
makes wipefs work, but as far as I can tell causes libblkid to use it in
preference to the probefunc so libblkid stops using the backup super
block as a way to identify a nilfs2 file system.  Also adding this
doesn't get the signature bytes in the backup super block erased.
Didn't seem to be a way to specify the second magic as being relative to
rounded 4K from the end of the partition.

Hope this analysis is correct.  I didn't see a trivial fix so I need to
leave it to the experts.

Thanks,
Mike
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux