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

2018-10-29 Thread Eugene Syromiatnikov
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 
> > Signed-off-by: Eugene Syromyatnikov 
> 
> Why do you have two separate sign-offs?

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

> -- 
> Jens Axboe
> 


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

2018-10-29 Thread Eugene Syromiatnikov
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 
> > Signed-off-by: Eugene Syromyatnikov 
> 
> Why do you have two separate sign-offs?

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

> -- 
> Jens Axboe
> 


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

2018-10-26 Thread Jens Axboe
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 
> Signed-off-by: Eugene Syromyatnikov 

Why do you have two separate sign-offs?

-- 
Jens Axboe



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

2018-10-26 Thread Jens Axboe
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 
> Signed-off-by: Eugene Syromyatnikov 

Why do you have two separate sign-offs?

-- 
Jens Axboe



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

2018-10-25 Thread 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/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 
Signed-off-by: Eugene Syromyatnikov 
---
 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_NONE1
 #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  0x0001  /* 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_NONE1
 #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  0x0001  /* File accessed */
-- 
2.1.4



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

2018-10-25 Thread 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/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 
Signed-off-by: Eugene Syromyatnikov 
---
 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_NONE1
 #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  0x0001  /* 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_NONE1
 #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  0x0001  /* File accessed */
-- 
2.1.4