lkml.org 
[lkml]   [2013]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [f2fs-dev] [PATCH v2] f2fs: refactor bio-related operations
From
Date
Hi,

> > + if (btype == META)
> > + rw |= REQ_META;
> > +
> > + if (is_read_io(rw)) {
> > + if (sync)
> > + rw |= READ_SYNC;
> > + submit_bio(rw, io->bio);
> > + trace_f2fs_submit_read_bio(sbi->sb, rw, type, io->bio);
> > + io->bio = NULL;
> > + return;
> > + }
> > +
> > + if (sync)
> > + rw |= WRITE_SYNC;
>
> rw = WRITE_SYNC; ?

No, since it removes the REQ_META.
See above.

>
> > + if (type >= META_FLUSH)
> > + rw |= WRITE_FLUSH_FUA;
>
> rw = WRITE_FLUSH_FUA; ?
>
> > +
> > + /*
> > + * META_FLUSH is only from the checkpoint procedure, and we should wait
> > + * this metadata bio for FS consistency.
> > + */
> > + if (type == META_FLUSH) {
> > + DECLARE_COMPLETION_ONSTACK(wait);
> > + io->bio->bi_private = &wait;
> > + submit_bio(rw, io->bio);
> > + wait_for_completion(&wait);
> > + } else {
> > + submit_bio(rw, io->bio);
> > + }
> > + trace_f2fs_submit_write_bio(sbi->sb, rw, btype, io->bio);
> > + io->bio = NULL;
> > +}
>
> [snip]
>
> Thanks,
> Yu
>

--
Jaegeuk Kim
Samsung



\
 
 \ /
  Last update: 2013-12-04 09:41    [W:0.087 / U:0.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site