* [PATCH] pvcreate: conditionally wipe swap signatures
@ 2009-03-16 18:56 Petr Rockai
2009-03-16 19:10 ` Alasdair G Kergon
2009-03-17 12:24 ` Milan Broz
0 siblings, 2 replies; 3+ messages in thread
From: Petr Rockai @ 2009-03-16 18:56 UTC (permalink / raw)
To: lvm-devel
Hi,
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm-pvcreate-wipe-swap.diff
Type: text/x-diff
Size: 4790 bytes
Desc: pvcreate-wipe-swap.diff
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20090316/8f5d0a79/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm-pvcreate-paranoia.diff
Type: text/x-diff
Size: 1662 bytes
Desc: lvm-pvcreate-paranoia.diff
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20090316/8f5d0a79/attachment-0001.bin>
-------------- next part --------------
Yours,
Petr.
--
Peter Rockai | me()mornfall!net | prockai()redhat!com
http://blog.mornfall.net | http://web.mornfall.net
"In My Egotistical Opinion, most people's C programs should be
indented six feet downward and covered with dirt."
-- Blair P. Houghton on the subject of C program indentation
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH] pvcreate: conditionally wipe swap signatures
2009-03-16 18:56 [PATCH] pvcreate: conditionally wipe swap signatures Petr Rockai
@ 2009-03-16 19:10 ` Alasdair G Kergon
2009-03-17 12:24 ` Milan Broz
1 sibling, 0 replies; 3+ messages in thread
From: Alasdair G Kergon @ 2009-03-16 19:10 UTC (permalink / raw)
To: lvm-devel
On Mon, Mar 16, 2009 at 07:56:40PM +0100, Peter 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.
Ack to both patches.
Alasdair
--
agk at redhat.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] pvcreate: conditionally wipe swap signatures
2009-03-16 18:56 [PATCH] pvcreate: conditionally wipe swap signatures Petr Rockai
2009-03-16 19:10 ` Alasdair G Kergon
@ 2009-03-17 12:24 ` Milan Broz
1 sibling, 0 replies; 3+ messages in thread
From: Milan Broz @ 2009-03-17 12:24 UTC (permalink / raw)
To: lvm-devel
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@redhat.com>
Tested-by: Milan Broz <mbroz@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]; ?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-17 12:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-16 18:56 [PATCH] pvcreate: conditionally wipe swap signatures Petr Rockai
2009-03-16 19:10 ` Alasdair G Kergon
2009-03-17 12:24 ` Milan Broz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.