Re: [PATCH v5 1/5] fs, block: refactor enum rw_hint

Christoph Hellwig
2024-09-12T14:01:02Z

On Tue, Sep 10, 2024 at 08:31:56PM +0530, Kanchan Joshi wrote:
> Rename enum rw_hint to rw_lifetime_hint.
> Change i_write_hint (in inode), bi_write_hint(in bio), and write_hint
> (in request) to use u8 data-type rather than this enum.
>
> This is in preparation to introduce a new write hint type.

The rationale seems a bit sparse. Why is it renamed? Because the
name fits better, because you need the same for something else?

> static void submit_bh_wbc(blk_opf_t opf, struct buffer_head *bh,
> - enum rw_hint hint, struct writeback_control *wbc);
> + u8 hint, struct writeback_control *wbc);

And moving from the enum to an plain integer seems like a bit of a
retrograde step.