linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name
@ 2018-10-06 17:51 Eugene Syromiatnikov
  2018-10-25 14:19 ` Eugene Syromiatnikov
  0 siblings, 1 reply; 13+ messages in thread
From: Eugene Syromiatnikov @ 2018-10-06 17:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexander Viro, Jeff Layton, J. Bruce Fields, Greg Kroah-Hartman,
	Ingo Molnar, Shaohua Li, Jens Axboe, linux-raid, linux-fsdevel

Hello.

This is a small fix of a typo (or, more specifically, some remnant of
the old patch version spelling) in RWH_WRITE_LIFE_NOT_SET constant,
which is named as RWF_WRITE_LIFE_NOT_SET currently.  Since the name
with "H" is used in man page and everywhere else, it's probably worth
to make the name used in the fcntl.h UAPI header in line with it.
Second follow-up patch updates (the sole) usage site of this constant
in kernel to use the new spelling.

The old name is retained as it is part of UAPI now.

Eugene Syromiatnikov (2):
  fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint
  drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET

 drivers/md/raid5.c               | 4 ++--
 fs/fcntl.c                       | 2 +-
 include/uapi/linux/fcntl.h       | 9 ++++++++-
 tools/include/uapi/linux/fcntl.h | 9 ++++++++-
 4 files changed, 19 insertions(+), 5 deletions(-)

-- 
2.1.4


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name
  2018-10-06 17:51 [PATCH 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name Eugene Syromiatnikov
@ 2018-10-25 14:19 ` Eugene Syromiatnikov
  2018-10-25 14:25   ` Jens Axboe
  0 siblings, 1 reply; 13+ messages in thread
From: Eugene Syromiatnikov @ 2018-10-25 14:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexander Viro, Jeff Layton, J. Bruce Fields, Greg Kroah-Hartman,
	Ingo Molnar, Shaohua Li, Jens Axboe, linux-raid, linux-fsdevel

On Sat, Oct 06, 2018 at 07:51:14PM +0200, Eugene Syromiatnikov wrote:
> Hello.
> 
> This is a small fix of a typo (or, more specifically, some remnant of
> the old patch version spelling) in RWH_WRITE_LIFE_NOT_SET constant,
> which is named as RWF_WRITE_LIFE_NOT_SET currently.  Since the name
> with "H" is used in man page and everywhere else, it's probably worth
> to make the name used in the fcntl.h UAPI header in line with it.
> Second follow-up patch updates (the sole) usage site of this constant
> in kernel to use the new spelling.
> 
> The old name is retained as it is part of UAPI now.

Hello, are there issues with the patches?

> Eugene Syromiatnikov (2):
>   fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint
>   drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET
> 
>  drivers/md/raid5.c               | 4 ++--
>  fs/fcntl.c                       | 2 +-
>  include/uapi/linux/fcntl.h       | 9 ++++++++-
>  tools/include/uapi/linux/fcntl.h | 9 ++++++++-
>  4 files changed, 19 insertions(+), 5 deletions(-)
> 
> -- 
> 2.1.4
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name
  2018-10-25 14:19 ` Eugene Syromiatnikov
@ 2018-10-25 14:25   ` Jens Axboe
  2018-10-25 15:00     ` Eugene Syromiatnikov
  2018-10-25 21:54     ` [PATCH RESEND " Eugene Syromyatnikov
  0 siblings, 2 replies; 13+ messages in thread
From: Jens Axboe @ 2018-10-25 14:25 UTC (permalink / raw)
  To: Eugene Syromiatnikov, linux-kernel
  Cc: Alexander Viro, Jeff Layton, J. Bruce Fields, Greg Kroah-Hartman,
	Ingo Molnar, Shaohua Li, linux-raid, linux-fsdevel

On 10/25/18 8:19 AM, Eugene Syromiatnikov wrote:
> On Sat, Oct 06, 2018 at 07:51:14PM +0200, Eugene Syromiatnikov wrote:
>> Hello.
>>
>> This is a small fix of a typo (or, more specifically, some remnant of
>> the old patch version spelling) in RWH_WRITE_LIFE_NOT_SET constant,
>> which is named as RWF_WRITE_LIFE_NOT_SET currently.  Since the name
>> with "H" is used in man page and everywhere else, it's probably worth
>> to make the name used in the fcntl.h UAPI header in line with it.
>> Second follow-up patch updates (the sole) usage site of this constant
>> in kernel to use the new spelling.
>>
>> The old name is retained as it is part of UAPI now.
> 
> Hello, are there issues with the patches?

I only got the 0/2 patch, none of the two others..

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name
  2018-10-25 14:25   ` Jens Axboe
@ 2018-10-25 15:00     ` Eugene Syromiatnikov
  2018-10-25 21:54     ` [PATCH RESEND " Eugene Syromyatnikov
  1 sibling, 0 replies; 13+ messages in thread
From: Eugene Syromiatnikov @ 2018-10-25 15:00 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-kernel, Alexander Viro, Jeff Layton, J. Bruce Fields,
	Greg Kroah-Hartman, Ingo Molnar, Shaohua Li, linux-raid,
	linux-fsdevel

On Thu, Oct 25, 2018 at 08:25:44AM -0600, Jens Axboe wrote:
> On 10/25/18 8:19 AM, Eugene Syromiatnikov wrote:
> > On Sat, Oct 06, 2018 at 07:51:14PM +0200, Eugene Syromiatnikov wrote:
> >> Hello.
> >>
> >> This is a small fix of a typo (or, more specifically, some remnant of
> >> the old patch version spelling) in RWH_WRITE_LIFE_NOT_SET constant,
> >> which is named as RWF_WRITE_LIFE_NOT_SET currently.  Since the name
> >> with "H" is used in man page and everywhere else, it's probably worth
> >> to make the name used in the fcntl.h UAPI header in line with it.
> >> Second follow-up patch updates (the sole) usage site of this constant
> >> in kernel to use the new spelling.
> >>
> >> The old name is retained as it is part of UAPI now.
> > 
> > Hello, are there issues with the patches?
> 
> I only got the 0/2 patch, none of the two others..

Uh, sorry, I see them on lkml[1][2], but likely have messed up git
format-patch options, as I usually do. Will resend shortly.

[1] https://lkml.org/lkml/2018/10/6/292
[2] https://lkml.org/lkml/2018/10/6/291

> -- 
> Jens Axboe
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH RESEND 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name
  2018-10-25 14:25   ` Jens Axboe
  2018-10-25 15:00     ` Eugene Syromiatnikov
@ 2018-10-25 21:54     ` Eugene Syromyatnikov
  2018-10-25 21:54       ` [PATCH RESEND 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint Eugene Syromiatnikov
  2018-10-25 21:54       ` [PATCH RESEND 2/2] drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET Eugene Syromiatnikov
  1 sibling, 2 replies; 13+ messages in thread
From: Eugene Syromyatnikov @ 2018-10-25 21:54 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexander Viro, Jeff Layton, J. Bruce Fields, Greg Kroah-Hartman,
	Ingo Molnar, Shaohua Li, Jens Axboe, linux-raid, linux-fsdevel

Hello.

This is a small fix of a typo (or, more specifically, some remnant of
the old patch version spelling) in RWH_WRITE_LIFE_NOT_SET constant,
which is named as RWF_WRITE_LIFE_NOT_SET currently.  Since the name
with "H" is used in man page and everywhere else, it's probably worth
to make the name used in the fcntl.h UAPI header in line with it.
Second follow-up patch updates (the sole) usage site of this constant
in kernel to use the new spelling.

The old name is retained as it is part of UAPI now.

Eugene Syromiatnikov (2):
  fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint
  drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET

 drivers/md/raid5.c               | 4 ++--
 fs/fcntl.c                       | 2 +-
 include/uapi/linux/fcntl.h       | 9 ++++++++-
 tools/include/uapi/linux/fcntl.h | 9 ++++++++-
 4 files changed, 19 insertions(+), 5 deletions(-)

-- 
2.1.4


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH RESEND 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint
  2018-10-25 21:54     ` [PATCH RESEND " Eugene Syromyatnikov
@ 2018-10-25 21:54       ` Eugene Syromiatnikov
  2018-10-26 14:44         ` Jens Axboe
  2018-10-25 21:54       ` [PATCH RESEND 2/2] drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET Eugene Syromiatnikov
  1 sibling, 1 reply; 13+ messages in thread
From: Eugene Syromiatnikov @ 2018-10-25 21:54 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexander Viro, Jeff Layton, J. Bruce Fields, Greg Kroah-Hartman,
	Ingo Molnar, Shaohua Li, Jens Axboe, linux-raid, linux-fsdevel

According to commit message in the original commit v4.13-rc1~212^2~51,
as well as userspace library[1] and man page update[2], R/W hint constants
are intended to have RWH_* prefix. However, RWF_WRITE_LIFE_NOT_SET retained
"RWF_*" prefix used in earlyy versions of the proposed patch set[3].
Rename it and provide the old name as a synonym for the new one
for backward compatibility.

[1] https://github.com/axboe/fio/commit/bd553af6c849
[2] https://github.com/mkerrisk/man-pages/commit/580082a186fd
[3] https://www.mail-archive.com/linux-block@vger.kernel.org/msg09638.html

Fixes: c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
---
 fs/fcntl.c                       | 2 +-
 include/uapi/linux/fcntl.h       | 9 ++++++++-
 tools/include/uapi/linux/fcntl.h | 9 ++++++++-
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/fs/fcntl.c b/fs/fcntl.c
index 0831851..9f7f57e 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -261,7 +261,7 @@ static int f_getowner_uids(struct file *filp, unsigned long arg)
 static bool rw_hint_valid(enum rw_hint hint)
 {
 	switch (hint) {
-	case RWF_WRITE_LIFE_NOT_SET:
+	case RWH_WRITE_LIFE_NOT_SET:
 	case RWH_WRITE_LIFE_NONE:
 	case RWH_WRITE_LIFE_SHORT:
 	case RWH_WRITE_LIFE_MEDIUM:
diff --git a/include/uapi/linux/fcntl.h b/include/uapi/linux/fcntl.h
index 6448cdd..e8f878a 100644
--- a/include/uapi/linux/fcntl.h
+++ b/include/uapi/linux/fcntl.h
@@ -57,7 +57,7 @@
  * Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be
  * used to clear any hints previously set.
  */
-#define RWF_WRITE_LIFE_NOT_SET	0
+#define RWH_WRITE_LIFE_NOT_SET	0
 #define RWH_WRITE_LIFE_NONE	1
 #define RWH_WRITE_LIFE_SHORT	2
 #define RWH_WRITE_LIFE_MEDIUM	3
@@ -65,6 +65,13 @@
 #define RWH_WRITE_LIFE_EXTREME	5
 
 /*
+ * The originally introduced spelling remained from the first
+ * versions of the patch set that introduced the feature,
+ * v4.13-rc1~212^2~51.
+ */
+#define RWF_WRITE_LIFE_NOT_SET	RWH_WRITE_LIFE_NOT_SET
+
+/*
  * Types of directory notifications that may be requested.
  */
 #define DN_ACCESS	0x00000001	/* File accessed */
diff --git a/tools/include/uapi/linux/fcntl.h b/tools/include/uapi/linux/fcntl.h
index 6448cdd..e8f878a 100644
--- a/tools/include/uapi/linux/fcntl.h
+++ b/tools/include/uapi/linux/fcntl.h
@@ -57,7 +57,7 @@
  * Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be
  * used to clear any hints previously set.
  */
-#define RWF_WRITE_LIFE_NOT_SET	0
+#define RWH_WRITE_LIFE_NOT_SET	0
 #define RWH_WRITE_LIFE_NONE	1
 #define RWH_WRITE_LIFE_SHORT	2
 #define RWH_WRITE_LIFE_MEDIUM	3
@@ -65,6 +65,13 @@
 #define RWH_WRITE_LIFE_EXTREME	5
 
 /*
+ * The originally introduced spelling remained from the first
+ * versions of the patch set that introduced the feature,
+ * v4.13-rc1~212^2~51.
+ */
+#define RWF_WRITE_LIFE_NOT_SET	RWH_WRITE_LIFE_NOT_SET
+
+/*
  * Types of directory notifications that may be requested.
  */
 #define DN_ACCESS	0x00000001	/* File accessed */
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH RESEND 2/2] drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET
  2018-10-25 21:54     ` [PATCH RESEND " Eugene Syromyatnikov
  2018-10-25 21:54       ` [PATCH RESEND 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint Eugene Syromiatnikov
@ 2018-10-25 21:54       ` Eugene Syromiatnikov
  1 sibling, 0 replies; 13+ messages in thread
From: Eugene Syromiatnikov @ 2018-10-25 21:54 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexander Viro, Jeff Layton, J. Bruce Fields, Greg Kroah-Hartman,
	Ingo Molnar, Shaohua Li, Jens Axboe, linux-raid, linux-fsdevel

As it is consistent with prefixes of other write life time hints.

Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
---
 drivers/md/raid5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index e4e98f4..0bcfbd3 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1139,7 +1139,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
 			bi->bi_iter.bi_size = STRIPE_SIZE;
 			bi->bi_write_hint = sh->dev[i].write_hint;
 			if (!rrdev)
-				sh->dev[i].write_hint = RWF_WRITE_LIFE_NOT_SET;
+				sh->dev[i].write_hint = RWH_WRITE_LIFE_NOT_SET;
 			/*
 			 * If this is discard request, set bi_vcnt 0. We don't
 			 * want to confuse SCSI because SCSI will replace payload
@@ -1192,7 +1192,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
 			rbi->bi_io_vec[0].bv_offset = 0;
 			rbi->bi_iter.bi_size = STRIPE_SIZE;
 			rbi->bi_write_hint = sh->dev[i].write_hint;
-			sh->dev[i].write_hint = RWF_WRITE_LIFE_NOT_SET;
+			sh->dev[i].write_hint = RWH_WRITE_LIFE_NOT_SET;
 			/*
 			 * If this is discard request, set bi_vcnt 0. We don't
 			 * want to confuse SCSI because SCSI will replace payload
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH RESEND 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint
  2018-10-25 21:54       ` [PATCH RESEND 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint Eugene Syromiatnikov
@ 2018-10-26 14:44         ` Jens Axboe
  2018-10-29 19:55           ` Eugene Syromiatnikov
  2018-10-29 20:00           ` [PATCH v2 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name Eugene Syromiatnikov
  0 siblings, 2 replies; 13+ messages in thread
From: Jens Axboe @ 2018-10-26 14:44 UTC (permalink / raw)
  To: Eugene Syromiatnikov, linux-kernel
  Cc: Alexander Viro, Jeff Layton, J. Bruce Fields, Greg Kroah-Hartman,
	Ingo Molnar, Shaohua Li, linux-raid, linux-fsdevel

On 10/25/18 3:54 PM, Eugene Syromiatnikov wrote:
> According to commit message in the original commit v4.13-rc1~212^2~51,
> as well as userspace library[1] and man page update[2], R/W hint constants
> are intended to have RWH_* prefix. However, RWF_WRITE_LIFE_NOT_SET retained
> "RWF_*" prefix used in earlyy versions of the proposed patch set[3].
> Rename it and provide the old name as a synonym for the new one
> for backward compatibility.
> 
> [1] https://github.com/axboe/fio/commit/bd553af6c849
> [2] https://github.com/mkerrisk/man-pages/commit/580082a186fd
> [3] https://www.mail-archive.com/linux-block@vger.kernel.org/msg09638.html

Looks good, thanks for catching this. One note:

> Fixes: c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints")
> Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
> Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>

Why do you have two separate sign-offs?

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH RESEND 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint
  2018-10-26 14:44         ` Jens Axboe
@ 2018-10-29 19:55           ` Eugene Syromiatnikov
  2018-10-29 20:00           ` [PATCH v2 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name Eugene Syromiatnikov
  1 sibling, 0 replies; 13+ messages in thread
From: Eugene Syromiatnikov @ 2018-10-29 19:55 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-kernel, Alexander Viro, Jeff Layton, J. Bruce Fields,
	Greg Kroah-Hartman, Ingo Molnar, Shaohua Li, linux-raid,
	linux-fsdevel

On Fri, Oct 26, 2018 at 08:44:35AM -0600, Jens Axboe wrote:
> On 10/25/18 3:54 PM, Eugene Syromiatnikov wrote:
> > According to commit message in the original commit v4.13-rc1~212^2~51,
> > as well as userspace library[1] and man page update[2], R/W hint constants
> > are intended to have RWH_* prefix. However, RWF_WRITE_LIFE_NOT_SET retained
> > "RWF_*" prefix used in earlyy versions of the proposed patch set[3].
> > Rename it and provide the old name as a synonym for the new one
> > for backward compatibility.
> > 
> > [1] https://github.com/axboe/fio/commit/bd553af6c849
> > [2] https://github.com/mkerrisk/man-pages/commit/580082a186fd
> > [3] https://www.mail-archive.com/linux-block@vger.kernel.org/msg09638.html
> 
> Looks good, thanks for catching this. One note:
> 
> > Fixes: c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints")
> > Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
> > Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
> 
> Why do you have two separate sign-offs?

Uh, sorry, I've messed up format-patch flags again.

> -- 
> Jens Axboe
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name
  2018-10-26 14:44         ` Jens Axboe
  2018-10-29 19:55           ` Eugene Syromiatnikov
@ 2018-10-29 20:00           ` Eugene Syromiatnikov
  2018-10-29 20:00             ` [PATCH v2 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint Eugene Syromiatnikov
                               ` (2 more replies)
  1 sibling, 3 replies; 13+ messages in thread
From: Eugene Syromiatnikov @ 2018-10-29 20:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexander Viro, Jeff Layton, J. Bruce Fields, Greg Kroah-Hartman,
	Ingo Molnar, Shaohua Li, Jens Axboe, linux-raid, linux-fsdevel

This is a small fix of a typo (or, more specifically, some remnant of
the old patch version spelling) in RWH_WRITE_LIFE_NOT_SET constant,
which is named as RWF_WRITE_LIFE_NOT_SET currently.  Since the name
with "H" is used in man page and everywhere else, it's probably worth
to make the name used in the fcntl.h UAPI header in line with it.
Second follow-up patch updates (the sole) usage site of this constant
in kernel to use the new spelling.

The old name is retained as it is part of UAPI now.

Changes since v1:
 * Changed format of the commit ID in the commit message of the first patch.
 * Removed bogus Signed-off-by that snuck into the resend of the series.

Eugene Syromiatnikov (2):
  fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint
  drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET

 drivers/md/raid5.c               | 4 ++--
 fs/fcntl.c                       | 2 +-
 include/uapi/linux/fcntl.h       | 9 ++++++++-
 tools/include/uapi/linux/fcntl.h | 9 ++++++++-
 4 files changed, 19 insertions(+), 5 deletions(-)

-- 
2.1.4


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint
  2018-10-29 20:00           ` [PATCH v2 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name Eugene Syromiatnikov
@ 2018-10-29 20:00             ` Eugene Syromiatnikov
  2018-10-29 20:00             ` [PATCH v2 2/2] drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET Eugene Syromiatnikov
  2018-12-17 11:39             ` [PATCH v2 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name Eugene Syromiatnikov
  2 siblings, 0 replies; 13+ messages in thread
From: Eugene Syromiatnikov @ 2018-10-29 20:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexander Viro, Jeff Layton, J. Bruce Fields, Greg Kroah-Hartman,
	Ingo Molnar, Shaohua Li, Jens Axboe, linux-raid, linux-fsdevel

According to commit message in the original commit c75b1d9421f8 ("fs:
add fcntl() interface for setting/getting write life time hints"),
as well as userspace library[1] and man page update[2], R/W hint constants
are intended to have RWH_* prefix. However, RWF_WRITE_LIFE_NOT_SET retained
"RWF_*" prefix used in early versions of the proposed patch set[3].
Rename it and provide the old name as a synonym for the new one
for backward compatibility.

[1] https://github.com/axboe/fio/commit/bd553af6c849
[2] https://github.com/mkerrisk/man-pages/commit/580082a186fd
[3] https://www.mail-archive.com/linux-block@vger.kernel.org/msg09638.html

Fixes: c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
---
 fs/fcntl.c                       | 2 +-
 include/uapi/linux/fcntl.h       | 9 ++++++++-
 tools/include/uapi/linux/fcntl.h | 9 ++++++++-
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/fs/fcntl.c b/fs/fcntl.c
index 0831851..9f7f57e 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -261,7 +261,7 @@ static int f_getowner_uids(struct file *filp, unsigned long arg)
 static bool rw_hint_valid(enum rw_hint hint)
 {
 	switch (hint) {
-	case RWF_WRITE_LIFE_NOT_SET:
+	case RWH_WRITE_LIFE_NOT_SET:
 	case RWH_WRITE_LIFE_NONE:
 	case RWH_WRITE_LIFE_SHORT:
 	case RWH_WRITE_LIFE_MEDIUM:
diff --git a/include/uapi/linux/fcntl.h b/include/uapi/linux/fcntl.h
index 6448cdd..e8f878a 100644
--- a/include/uapi/linux/fcntl.h
+++ b/include/uapi/linux/fcntl.h
@@ -57,7 +57,7 @@
  * Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be
  * used to clear any hints previously set.
  */
-#define RWF_WRITE_LIFE_NOT_SET	0
+#define RWH_WRITE_LIFE_NOT_SET	0
 #define RWH_WRITE_LIFE_NONE	1
 #define RWH_WRITE_LIFE_SHORT	2
 #define RWH_WRITE_LIFE_MEDIUM	3
@@ -65,6 +65,13 @@
 #define RWH_WRITE_LIFE_EXTREME	5
 
 /*
+ * The originally introduced spelling remained from the first
+ * versions of the patch set that introduced the feature,
+ * v4.13-rc1~212^2~51.
+ */
+#define RWF_WRITE_LIFE_NOT_SET	RWH_WRITE_LIFE_NOT_SET
+
+/*
  * Types of directory notifications that may be requested.
  */
 #define DN_ACCESS	0x00000001	/* File accessed */
diff --git a/tools/include/uapi/linux/fcntl.h b/tools/include/uapi/linux/fcntl.h
index 6448cdd..e8f878a 100644
--- a/tools/include/uapi/linux/fcntl.h
+++ b/tools/include/uapi/linux/fcntl.h
@@ -57,7 +57,7 @@
  * Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be
  * used to clear any hints previously set.
  */
-#define RWF_WRITE_LIFE_NOT_SET	0
+#define RWH_WRITE_LIFE_NOT_SET	0
 #define RWH_WRITE_LIFE_NONE	1
 #define RWH_WRITE_LIFE_SHORT	2
 #define RWH_WRITE_LIFE_MEDIUM	3
@@ -65,6 +65,13 @@
 #define RWH_WRITE_LIFE_EXTREME	5
 
 /*
+ * The originally introduced spelling remained from the first
+ * versions of the patch set that introduced the feature,
+ * v4.13-rc1~212^2~51.
+ */
+#define RWF_WRITE_LIFE_NOT_SET	RWH_WRITE_LIFE_NOT_SET
+
+/*
  * Types of directory notifications that may be requested.
  */
 #define DN_ACCESS	0x00000001	/* File accessed */
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 2/2] drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET
  2018-10-29 20:00           ` [PATCH v2 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name Eugene Syromiatnikov
  2018-10-29 20:00             ` [PATCH v2 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint Eugene Syromiatnikov
@ 2018-10-29 20:00             ` Eugene Syromiatnikov
  2018-12-17 11:39             ` [PATCH v2 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name Eugene Syromiatnikov
  2 siblings, 0 replies; 13+ messages in thread
From: Eugene Syromiatnikov @ 2018-10-29 20:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexander Viro, Jeff Layton, J. Bruce Fields, Greg Kroah-Hartman,
	Ingo Molnar, Shaohua Li, Jens Axboe, linux-raid, linux-fsdevel

As it is consistent with prefixes of other write life time hints.

Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
---
 drivers/md/raid5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index e4e98f4..0bcfbd3 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1139,7 +1139,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
 			bi->bi_iter.bi_size = STRIPE_SIZE;
 			bi->bi_write_hint = sh->dev[i].write_hint;
 			if (!rrdev)
-				sh->dev[i].write_hint = RWF_WRITE_LIFE_NOT_SET;
+				sh->dev[i].write_hint = RWH_WRITE_LIFE_NOT_SET;
 			/*
 			 * If this is discard request, set bi_vcnt 0. We don't
 			 * want to confuse SCSI because SCSI will replace payload
@@ -1192,7 +1192,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
 			rbi->bi_io_vec[0].bv_offset = 0;
 			rbi->bi_iter.bi_size = STRIPE_SIZE;
 			rbi->bi_write_hint = sh->dev[i].write_hint;
-			sh->dev[i].write_hint = RWF_WRITE_LIFE_NOT_SET;
+			sh->dev[i].write_hint = RWH_WRITE_LIFE_NOT_SET;
 			/*
 			 * If this is discard request, set bi_vcnt 0. We don't
 			 * want to confuse SCSI because SCSI will replace payload
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name
  2018-10-29 20:00           ` [PATCH v2 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name Eugene Syromiatnikov
  2018-10-29 20:00             ` [PATCH v2 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint Eugene Syromiatnikov
  2018-10-29 20:00             ` [PATCH v2 2/2] drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET Eugene Syromiatnikov
@ 2018-12-17 11:39             ` Eugene Syromiatnikov
  2 siblings, 0 replies; 13+ messages in thread
From: Eugene Syromiatnikov @ 2018-12-17 11:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexander Viro, Jeff Layton, J. Bruce Fields, Greg Kroah-Hartman,
	Ingo Molnar, Shaohua Li, Jens Axboe, linux-raid, linux-fsdevel

On Mon, Oct 29, 2018 at 09:00:45PM +0100, Eugene Syromiatnikov wrote:
> This is a small fix of a typo (or, more specifically, some remnant of
> the old patch version spelling) in RWH_WRITE_LIFE_NOT_SET constant,
> which is named as RWF_WRITE_LIFE_NOT_SET currently.  Since the name
> with "H" is used in man page and everywhere else, it's probably worth
> to make the name used in the fcntl.h UAPI header in line with it.
> Second follow-up patch updates (the sole) usage site of this constant
> in kernel to use the new spelling.
> 
> The old name is retained as it is part of UAPI now.

Hello.

Are there any issues with this version of the series?

> Changes since v1:
>  * Changed format of the commit ID in the commit message of the first patch.
>  * Removed bogus Signed-off-by that snuck into the resend of the series.
> 
> Eugene Syromiatnikov (2):
>   fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint
>   drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET
> 
>  drivers/md/raid5.c               | 4 ++--
>  fs/fcntl.c                       | 2 +-
>  include/uapi/linux/fcntl.h       | 9 ++++++++-
>  tools/include/uapi/linux/fcntl.h | 9 ++++++++-
>  4 files changed, 19 insertions(+), 5 deletions(-)
> 
> -- 
> 2.1.4
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-12-17 11:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-06 17:51 [PATCH 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name Eugene Syromiatnikov
2018-10-25 14:19 ` Eugene Syromiatnikov
2018-10-25 14:25   ` Jens Axboe
2018-10-25 15:00     ` Eugene Syromiatnikov
2018-10-25 21:54     ` [PATCH RESEND " Eugene Syromyatnikov
2018-10-25 21:54       ` [PATCH RESEND 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint Eugene Syromiatnikov
2018-10-26 14:44         ` Jens Axboe
2018-10-29 19:55           ` Eugene Syromiatnikov
2018-10-29 20:00           ` [PATCH v2 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name Eugene Syromiatnikov
2018-10-29 20:00             ` [PATCH v2 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint Eugene Syromiatnikov
2018-10-29 20:00             ` [PATCH v2 2/2] drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET Eugene Syromiatnikov
2018-12-17 11:39             ` [PATCH v2 0/2] Fix typo in RWH_WRITE_LIFE_NOT_SET constant name Eugene Syromiatnikov
2018-10-25 21:54       ` [PATCH RESEND 2/2] drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET Eugene Syromiatnikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).