Add WRITE_LIFE_HINT_NR into the rw_hint enum to define the number of
values write life time hints can be set to. This is useful for e.g.
file systems which may want to map these values to allocation groups.
Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com>
---
include/linux/rw_hint.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/rw_hint.h b/include/linux/rw_hint.h
index 309ca72f2dfb..adcc43042c90 100644
--- a/include/linux/rw_hint.h
+++ b/include/linux/rw_hint.h
@@ -14,6 +14,7 @@ enum rw_hint {
WRITE_LIFE_MEDIUM = RWH_WRITE_LIFE_MEDIUM,
WRITE_LIFE_LONG = RWH_WRITE_LIFE_LONG,
WRITE_LIFE_EXTREME = RWH_WRITE_LIFE_EXTREME,
+ WRITE_LIFE_HINT_NR,
} __packed;
/* Sparse ignores __packed annotations on enums, hence the #ifndef below. */
--
2.34.1
On Mon, Sep 01, 2025 at 10:52:04AM +0000, Hans Holmberg wrote:
> Add WRITE_LIFE_HINT_NR into the rw_hint enum to define the number of
> values write life time hints can be set to. This is useful for e.g.
> file systems which may want to map these values to allocation groups.
>
> Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com>
Cc'ing Chris Brauner here, as I think he is who will be picking this up.
The other two can go through XFS tree.
> ---
> include/linux/rw_hint.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/rw_hint.h b/include/linux/rw_hint.h
> index 309ca72f2dfb..adcc43042c90 100644
> --- a/include/linux/rw_hint.h
> +++ b/include/linux/rw_hint.h
> @@ -14,6 +14,7 @@ enum rw_hint {
> WRITE_LIFE_MEDIUM = RWH_WRITE_LIFE_MEDIUM,
> WRITE_LIFE_LONG = RWH_WRITE_LIFE_LONG,
> WRITE_LIFE_EXTREME = RWH_WRITE_LIFE_EXTREME,
> + WRITE_LIFE_HINT_NR,
> } __packed;
>
> /* Sparse ignores __packed annotations on enums, hence the #ifndef below. */
> --
> 2.34.1
>
On Fri, Sep 05, 2025 at 10:17:51AM +0200, Carlos Maiolino wrote: > On Mon, Sep 01, 2025 at 10:52:04AM +0000, Hans Holmberg wrote: > > Add WRITE_LIFE_HINT_NR into the rw_hint enum to define the number of > > values write life time hints can be set to. This is useful for e.g. > > file systems which may want to map these values to allocation groups. > > > > Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com> > > Cc'ing Chris Brauner here, as I think he is who will be picking this up. This is so trivial, just take it through xfs, please.
On Fri, Sep 05, 2025 at 04:03:51PM +0200, Christian Brauner wrote: > On Fri, Sep 05, 2025 at 10:17:51AM +0200, Carlos Maiolino wrote: > > On Mon, Sep 01, 2025 at 10:52:04AM +0000, Hans Holmberg wrote: > > > Add WRITE_LIFE_HINT_NR into the rw_hint enum to define the number of > > > values write life time hints can be set to. This is useful for e.g. > > > file systems which may want to map these values to allocation groups. > > > > > > Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com> > > > > Cc'ing Chris Brauner here, as I think he is who will be picking this up. > > This is so trivial, just take it through xfs, please. Deal.
Looks good, but you probably want to add a few more folks that
created this constant and the header to the Cc list.
Reviewed-by: Christoph Hellwig <hch@lst.de>
On Mon, Sep 01, 2025 at 10:52:04AM +0000, Hans Holmberg wrote:
> Add WRITE_LIFE_HINT_NR into the rw_hint enum to define the number of
> values write life time hints can be set to. This is useful for e.g.
> file systems which may want to map these values to allocation groups.
>
> Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com>
> ---
> include/linux/rw_hint.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/rw_hint.h b/include/linux/rw_hint.h
> index 309ca72f2dfb..adcc43042c90 100644
> --- a/include/linux/rw_hint.h
> +++ b/include/linux/rw_hint.h
> @@ -14,6 +14,7 @@ enum rw_hint {
> WRITE_LIFE_MEDIUM = RWH_WRITE_LIFE_MEDIUM,
> WRITE_LIFE_LONG = RWH_WRITE_LIFE_LONG,
> WRITE_LIFE_EXTREME = RWH_WRITE_LIFE_EXTREME,
> + WRITE_LIFE_HINT_NR,
> } __packed;
>
> /* Sparse ignores __packed annotations on enums, hence the #ifndef below. */
> --
> 2.34.1
---end quoted text---
On 9/1/25 10:41 PM, hch wrote:
> Looks good, but you probably want to add a few more folks that
> created this constant and the header to the Cc list.
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> On Mon, Sep 01, 2025 at 10:52:04AM +0000, Hans Holmberg wrote:
>> Add WRITE_LIFE_HINT_NR into the rw_hint enum to define the number of
>> values write life time hints can be set to. This is useful for e.g.
>> file systems which may want to map these values to allocation groups.
>>
>> Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com>
>> ---
>> include/linux/rw_hint.h | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/include/linux/rw_hint.h b/include/linux/rw_hint.h
>> index 309ca72f2dfb..adcc43042c90 100644
>> --- a/include/linux/rw_hint.h
>> +++ b/include/linux/rw_hint.h
>> @@ -14,6 +14,7 @@ enum rw_hint {
>> WRITE_LIFE_MEDIUM = RWH_WRITE_LIFE_MEDIUM,
>> WRITE_LIFE_LONG = RWH_WRITE_LIFE_LONG,
>> WRITE_LIFE_EXTREME = RWH_WRITE_LIFE_EXTREME,
>> + WRITE_LIFE_HINT_NR,
>> } __packed;
>>
>> /* Sparse ignores __packed annotations on enums, hence the #ifndef below. */
>> --
>> 2.34.1
> ---end quoted text---
Thanks Christoph for having Cc-ed me. I'm not a big fan of this type of
change because it makes it harder to write switch-statements without
'default:' clause. From a quick look I haven't found any such
switch-statements on 'enum rw_hint' so I'm fine with this change.
Bart.
On 02/09/2025 07:41, hch wrote:
> Looks good, but you probably want to add a few more folks that
> created this constant and the header to the Cc list.
Yes, thanks for adding Bart and Jens.
Adding the others who where in cc when the header was created.
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> On Mon, Sep 01, 2025 at 10:52:04AM +0000, Hans Holmberg wrote:
>> Add WRITE_LIFE_HINT_NR into the rw_hint enum to define the number of
>> values write life time hints can be set to. This is useful for e.g.
>> file systems which may want to map these values to allocation groups.
>>
>> Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com>
>> ---
>> include/linux/rw_hint.h | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/include/linux/rw_hint.h b/include/linux/rw_hint.h
>> index 309ca72f2dfb..adcc43042c90 100644
>> --- a/include/linux/rw_hint.h
>> +++ b/include/linux/rw_hint.h
>> @@ -14,6 +14,7 @@ enum rw_hint {
>> WRITE_LIFE_MEDIUM = RWH_WRITE_LIFE_MEDIUM,
>> WRITE_LIFE_LONG = RWH_WRITE_LIFE_LONG,
>> WRITE_LIFE_EXTREME = RWH_WRITE_LIFE_EXTREME,
>> + WRITE_LIFE_HINT_NR,
>> } __packed;
>>
>> /* Sparse ignores __packed annotations on enums, hence the #ifndef below. */
>> --
>> 2.34.1
> ---end quoted text---
>
© 2016 - 2025 Red Hat, Inc.