Re: [RFC PATCH 02/02] swapon: add "cluster-discard" support

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

 



On Mon, May 20, 2013 at 09:02:43PM -0400, KOSAKI Motohiro wrote:
> > -	if (fl_discard)
> > +	if (fl_discard) {
> >  		flags |= SWAP_FLAG_DISCARD;
> > +		if (fl_discard > 1)
> > +			flags |= SWAP_FLAG_DISCARD_CLUSTER;
> 
> This is not enough, IMHO. When running this code on old kernel, swapon() return EINVAL.
> At that time, we should fall back swapon(0x10000).

 Hmm.. currently we don't use any fallback for any swap flag (e.g.
 0x10000) for compatibility with old kernels. Maybe it's better to
 keep it simple and stupid and return an error message than introduce
 any super-smart semantic to hide incompatible fstab configuration.

    Karel
 
-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]