Update RWF_SUPPORTED for Linux kernel 4.16 [BZ #22947]

Message ID 20180403160731.GA29605@intel.com
State New
Headers show
Series
  • Update RWF_SUPPORTED for Linux kernel 4.16 [BZ #22947]
Related show

Commit Message

H.J. Lu April 3, 2018, 4:07 p.m.
Add RWF_APPEND to RWF_SUPPORTED to support Linux kernel 4.16.

OK for master?

H.J.
---
	[BZ #22947]
	* misc/tst-preadvwritev2-common.c (RWF_APPEND): New.
	(RWF_SUPPORTED): Add RWF_APPEND.
---
 misc/tst-preadvwritev2-common.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Adhemerval Zanella April 3, 2018, 4:15 p.m. | #1
On 03/04/2018 13:07, H.J. Lu wrote:
> Add RWF_APPEND to RWF_SUPPORTED to support Linux kernel 4.16.
> 
> OK for master?

Now 4.16 is out we need to update sysdeps/unix/sysv/linux/bits/uio-ext.h,
bits/uio-ext.h, and manual/llio.texi as well.

> 
> H.J.
> ---
> 	[BZ #22947]
> 	* misc/tst-preadvwritev2-common.c (RWF_APPEND): New.
> 	(RWF_SUPPORTED): Add RWF_APPEND.
> ---
>  misc/tst-preadvwritev2-common.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/misc/tst-preadvwritev2-common.c b/misc/tst-preadvwritev2-common.c
> index 89fd0a3ff5..99d385173b 100644
> --- a/misc/tst-preadvwritev2-common.c
> +++ b/misc/tst-preadvwritev2-common.c
> @@ -34,7 +34,11 @@ do_test_with_invalid_flags (void)
>  #ifndef RWF_NOWAIT
>  # define RWF_NOWAIT 0
>  #endif
> -#define RWF_SUPPORTED	(RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT)
> +#ifndef RWF_APPEND
> +# define RWF_APPEND 0x10
> +#endif
> +#define RWF_SUPPORTED	(RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT \
> +			 | RWF_APPEND)
>    /* Set the next bit from the mask of all supported flags.  */
>    int invalid_flag = RWF_SUPPORTED != 0 ? __builtin_clz (RWF_SUPPORTED) : 2;
>    invalid_flag = 0x1 << ((sizeof (int) * CHAR_BIT) - invalid_flag);
>
H.J. Lu April 3, 2018, 6:18 p.m. | #2
On Tue, Apr 3, 2018 at 9:15 AM, Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
>
> On 03/04/2018 13:07, H.J. Lu wrote:
>> Add RWF_APPEND to RWF_SUPPORTED to support Linux kernel 4.16.
>>
>> OK for master?
>
> Now 4.16 is out we need to update sysdeps/unix/sysv/linux/bits/uio-ext.h,
> bits/uio-ext.h, and manual/llio.texi as well.
>

Here is the updated patch.  OK for master?
Adhemerval Zanella April 3, 2018, 7:14 p.m. | #3
On 03/04/2018 15:18, H.J. Lu wrote:
> On Tue, Apr 3, 2018 at 9:15 AM, Adhemerval Zanella
> <adhemerval.zanella@linaro.org> wrote:
>>
>>
>> On 03/04/2018 13:07, H.J. Lu wrote:
>>> Add RWF_APPEND to RWF_SUPPORTED to support Linux kernel 4.16.
>>>
>>> OK for master?
>>
>> Now 4.16 is out we need to update sysdeps/unix/sysv/linux/bits/uio-ext.h,
>> bits/uio-ext.h, and manual/llio.texi as well.
>>
> 
> Here is the updated patch.  OK for master?
> 

LGTM, thanks.

Patch

diff --git a/misc/tst-preadvwritev2-common.c b/misc/tst-preadvwritev2-common.c
index 89fd0a3ff5..99d385173b 100644
--- a/misc/tst-preadvwritev2-common.c
+++ b/misc/tst-preadvwritev2-common.c
@@ -34,7 +34,11 @@  do_test_with_invalid_flags (void)
 #ifndef RWF_NOWAIT
 # define RWF_NOWAIT 0
 #endif
-#define RWF_SUPPORTED	(RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT)
+#ifndef RWF_APPEND
+# define RWF_APPEND 0x10
+#endif
+#define RWF_SUPPORTED	(RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT \
+			 | RWF_APPEND)
   /* Set the next bit from the mask of all supported flags.  */
   int invalid_flag = RWF_SUPPORTED != 0 ? __builtin_clz (RWF_SUPPORTED) : 2;
   invalid_flag = 0x1 << ((sizeof (int) * CHAR_BIT) - invalid_flag);