[lvm-devel] [PATCH] pvcreate: conditionally wipe swap signatures
Milan Broz
mbroz at redhat.com
Tue Mar 17 12:24:29 UTC 2009
Petr Rockai wrote:
>
> this should address https://bugzilla.redhat.com/show_bug.cgi?id=443062 -- the
> first patch implements the actual check, in the spirit of dev_is_md (it also
> gets a check in the testsuite). The code is based on swap signature detection
> in swapon implementation of util-linux-ng:
> http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=blob_plain;f=mount/swapon.c
>
> The latter patch just throws in some checks that the old code misses. They
> might as well be redundant (or not, depends on how you look at it). Personally,
> I am ambivalent -- advice about (non-)inclusion sought.
Reviewed-by: Milan Broz <mbroz at redhat.com>
Tested-by: Milan Broz <mbroz at redhat.com>
Milan
--
mbroz at redhat.com
nit-picking mode:
+int dev_is_swap(struct device *dev, uint64_t *signature)
+{
+ char buf[10];
why not char buf[SIGNATURE_SIZE]; ?
More information about the lvm-devel
mailing list