Skip to contentSkip to conversation

Fix typo in RWH_WRITE_LIFE_NOT_SET constant name

PATCH In review Eugene Syromiatnikov 3 participants 13 messages Oct 6, 2018 – Dec 17, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Fix typo in RWH_WRITE_LIFE_NOT_SET constant name

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(-)
Signature · 1 line
2.1.4
#1 lore raw
Quoted 11 lines · Eugene Syromiatnikov

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?

Quoted 13 lines

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(-)
Signature · 1 line
2.1.4
#2 lore raw
Quoted 11 lines · Eugene Syromiatnikov
Quoted 10 lines · Eugene Syromiatnikov

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.

Quoted 3 lines
Quoted 1 line

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..

Signature · 1 line
Jens Axboe
#3 lore raw
Quoted 12 lines · Jens Axboe
Quoted 11 lines · Eugene Syromiatnikov
Quoted 10 lines · Eugene Syromiatnikov

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.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

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

Quoted 3 lines
Signature · 1 line
Jens Axboe
#4 lore raw

cover Fix typo in RWH_WRITE_LIFE_NOT_SET constant name

In reply to Jens Axboe

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(-)
Signature · 1 line
2.1.4
#5 lore raw

PATCH RESEND 1/2 fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint

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/[email protected]/msg09638.html

Fixes c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints")
---
 fs/fcntl.c                       | 2 +-
 include/uapi/linux/fcntl.h       | 9 ++++++++-
 tools/include/uapi/linux/fcntl.h | 9 ++++++++-
 3 files changed, 17 insertions(+), 3 deletions(-)
fs/fcntl.c +1 -1
index 0831851..9f7f57e 100644
@@ -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:
include/uapi/linux/fcntl.h +8 -1
index 6448cdd..e8f878a 100644
@@ -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 */
tools/include/uapi/linux/fcntl.h +8 -1
index 6448cdd..e8f878a 100644
@@ -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 */
Signature · 1 line
2.1.4
#6 lore raw

Re: [PATCH RESEND 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint

Quoted 10 lines · Eugene Syromiatnikov

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/[email protected]/msg09638.html

Looks good, thanks for catching this. One note:

Quoted 3 lines
Fixes c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints")

Why do you have two separate sign-offs?

Signature · 1 line
Jens Axboe
#7 lore raw

Re: [PATCH RESEND 1/2] fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint

Quoted 12 lines · Jens Axboe
Quoted 10 lines · Eugene Syromiatnikov

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/[email protected]/msg09638.html

Quoted 7 lines

Looks good, thanks for catching this. One note:

Quoted 3 lines
Fixes c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints")

Why do you have two separate sign-offs?

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

Quoted 3 lines
Signature · 1 line
Jens Axboe
#8 lore raw

v2 cover Fix typo in RWH_WRITE_LIFE_NOT_SET constant name

In reply to Jens Axboe

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(-)
Signature · 1 line
2.1.4
#9 lore raw

PATCH v2 1/2 fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint

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/[email protected]/msg09638.html

Fixes c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints")
---
 fs/fcntl.c                       | 2 +-
 include/uapi/linux/fcntl.h       | 9 ++++++++-
 tools/include/uapi/linux/fcntl.h | 9 ++++++++-
 3 files changed, 17 insertions(+), 3 deletions(-)
fs/fcntl.c +1 -1
index 0831851..9f7f57e 100644
@@ -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:
include/uapi/linux/fcntl.h +8 -1
index 6448cdd..e8f878a 100644
@@ -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 */
tools/include/uapi/linux/fcntl.h +8 -1
index 6448cdd..e8f878a 100644
@@ -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 */
Signature · 1 line
2.1.4
#10 lore raw

PATCH v2 2/2 drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET

In reply to Eugene Syromiatnikov

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

---
 drivers/md/raid5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/md/raid5.c +2 -2
index e4e98f4..0bcfbd3 100644
@@ -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
Signature · 1 line
2.1.4
#11 lore raw
In reply to Eugene Syromiatnikov
Quoted 9 lines · Eugene Syromiatnikov

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?

Quoted 17 lines

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(-)
Signature · 1 line
2.1.4
#12 lore raw

PATCH RESEND 2/2 drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET

In reply to Eugene Syromyatnikov

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

---
 drivers/md/raid5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/md/raid5.c +2 -2
index e4e98f4..0bcfbd3 100644
@@ -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
Signature · 1 line
2.1.4