On Tue, Sep 06, 2022 at 11:43:47PM +0800, Chao Yu wrote:
> > @@ -1768,6 +1745,8 @@ static void f2fs_verify_cluster(struct work_struct 
> > *work)
> >   void f2fs_decompress_end_io(struct decompress_io_ctx *dic, bool failed,
> >                             bool in_task)
> >   {
> > +   int i;
> > +
> >     if (!failed && dic->need_verity) {
> >             /*
> >              * Note that to avoid deadlocks, the verity work can't be done
> > @@ -1777,9 +1756,28 @@ void f2fs_decompress_end_io(struct decompress_io_ctx 
> > *dic, bool failed,
> >              */
> >             INIT_WORK(&dic->verity_work, f2fs_verify_cluster);
> >             fsverity_enqueue_verify_work(&dic->verity_work);
> > -   } else {
> > -           __f2fs_decompress_end_io(dic, failed, in_task);
> 
> Will it be possible to clean up __f2fs_decompress_end_io() and
> f2fs_verify_cluster(), they looks almost similar...
> 

I feel that it's simpler to keep them separate.

> > +static void f2fs_finish_read_bio(struct bio *bio, bool in_task,
> > +                            bool fail_compressed)
> 
> Not sure, fail_decompress or fail_decompression may looks more readable?
> 

I'll add a field 'bool decompression_attempted' to struct bio_post_read_ctx so
that this extra argument won't be needed.

- Eric


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to