Re: swapon using mkswap [changed subject]

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

 



On Mon, Jan 26, 2009 at 08:43:20AM +0100, Olaf Hering wrote:
> On Fri, Jan 23, Hugh Dickins wrote:
> 
> > But that's a personal preference, and I don't think I have strong
> > enough reason to turn everything around in that direction.  What
> > I most strongly object to is this behaviour happening by default:
> > pity those who by mistake point swapon at the wrong partition,
> > and it just happens to have what looks like a swapspace signature
> > at one of the offsets (not a very great likelihood, I admit).
> 
> The swap signature is not just a random string at a random place, mkswap
> does also check if the partition or filesize matches with the metadata.
> So its unlikely that an innocent partition or file gets corrupted by
> mkswap, but it can probably still happen.
> I agree that mkswap (or whatever does the validation) should be more
> careful and rewrite more parts of the metadata for the current pagesize.
> 
> If there is a bug in the current 11.1 or upstream implementation,
> please help to get it fixed.

 what about to add "-r" (or so..) swapon option to enable automatic
 swap area reinitialization after pagesize change? It means disable
 the feature by default.

 Frankly, swap v1 header is nothing nice -- the dependence on
 architecture, pagesize, variable header position, ... that's pretty
 idiotic.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" 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