Re: [PATCH] add discard option -d to swapon

2014-03-24 Thread Tito
On Monday 24 March 2014 01:09:01 you wrote: On Monday, 24 March 2014, at 12:06 am, Tito wrote: On Sunday 23 March 2014 23:09:59 you wrote: This is still going to create a hell when adding the discard flag. Consider what will happen in the enum: if DISCARD is enabled but PRI is

Re: [PATCH] add discard option -d to swapon

2014-03-23 Thread Denys Vlasenko
Applied, thanks On Sun, Mar 23, 2014 at 12:33 AM, Matt Whitlock busy...@mattwhitlock.name wrote: Attached are a series of three patches affecting swaponoff. Patch #1 fixes two small logic errors: (a) the bb_strtou function was called inside an instantiation of the MIN macro, which would

Re: [PATCH] add discard option -d to swapon

2014-03-23 Thread Tito
On Sunday 23 March 2014 00:33:04 Matt Whitlock wrote: Attached are a series of three patches affecting swaponoff. Patch #1 fixes two small logic errors: (a) the bb_strtou function was called inside an instantiation of the MIN macro, which would cause the function to be called twice in the

Re: [PATCH] add discard option -d to swapon

2014-03-23 Thread Matt Whitlock
On Sunday, 23 March 2014, at 8:29 pm, Tito wrote: On Sunday 23 March 2014 00:33:04 Matt Whitlock wrote: Attached are a series of three patches affecting swaponoff. Hi, attached you will find a alternative patch to your patches #1 and #2 that includes your fixes and improvements and

Re: [PATCH] add discard option -d to swapon

2014-03-23 Thread Tito
On Sunday 23 March 2014 23:09:59 you wrote: On Sunday, 23 March 2014, at 8:29 pm, Tito wrote: On Sunday 23 March 2014 00:33:04 Matt Whitlock wrote: Attached are a series of three patches affecting swaponoff. Hi, attached you will find a alternative patch to your patches #1 and #2 that

Re: [PATCH] add discard option -d to swapon

2014-03-23 Thread Matt Whitlock
On Monday, 24 March 2014, at 12:06 am, Tito wrote: On Sunday 23 March 2014 23:09:59 you wrote: This is still going to create a hell when adding the discard flag. Consider what will happen in the enum: if DISCARD is enabled but PRI is disabled, then OPT_d will be (1 1), but if both are

[PATCH] add discard option -d to swapon

2014-03-22 Thread Matt Whitlock
Attached are a series of three patches affecting swaponoff. Patch #1 fixes two small logic errors: (a) the bb_strtou function was called inside an instantiation of the MIN macro, which would cause the function to be called twice in the common case; and (b) the actual maximum allowable swap