On 10/9/23 22:42, Kanchan Joshi wrote:
On 10/6/2023 1:10 AM, Bart Van Assche wrote:
+static inline enum rw_hint bio_get_data_lifetime(struct bio *bio)
+{
+ /* +1 to map 0 onto WRITE_LIFE_NONE. */
+ return IOPRIO_PRIO_LIFETIME(bio->bi_ioprio) + 1;
+}
+
+static inline void bio_set_data_lifetime(struct bio *bio, enum rw_hint lifetime)
+{
+ /* -1 to map WRITE_LIFE_NONE onto 0. */
+ if (lifetime != 0)
+ lifetime--;
How the driver can figure when lifetime is not set, and when it is set
to WRITE_LIFE_NONE? If it uses IOPRIO_PRIO_LIFETIME (as patch 8 does),
it will see 0 in both cases.
F2FS fs-based whint_mode seems to expect distinct streams for
WRITE_LIFE_NOT_SET and WRITE_LIFE_NONE.
I will remove the -1 / +1 from the above code.
Thanks,
Bart.