Re: question about cache flushes and raid journal in writeback mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 23, 2019 at 4:04 PM Michal Soltys <soltys@xxxxxxxx> wrote:
>
> On 19/01/23 18:14, Song Liu wrote:
> > On Wed, Jan 23, 2019 at 8:53 AM Michal Soltys <soltys@xxxxxxxx> wrote:
> >>
> >> Hi,
> >>
> >> From kernel documentation:
> >>
> >> "In write-back mode, MD reports IO completion to upper layer (usually
> >> filesystems) right after the data hits cache disk."
> >>
> >> Does "data hits cache disk" mean the actual flush of the journal device as well ?
> >> Or is it staged for later moment when the full-stripe write(s) to the actual raid
> >> device are to be performed ?
> >>
> > MD layer will write the data to the cache disk, but not flush it. Flush happens
> > when upper layer (file system or application) issues flush (fsync, etc.).
> >
> > Does this answer the question?
>
> Yes, thanks.
>
> For the record, my question came after checking 2016 presentation (
> https://events.static.linuxfound.org/sites/events/files/slides/2016_vault_write_journal_cache_v2.pdf
> ). The slide titled "RAID - 456 Write Cache: Write Path" kind of
> suggested that the flush might be happening, which was a bit suspicious
> (or I misunderstood that slide).

Yeah, that was a little confusing. The actual bio will have PREFLUSH or FUA
flag if it contains upper layer bios with PREFLUSH or FUA. You can see the logic
in function r5l_do_submit_io().

Thanks,
Song

>
> >
> > Thanks,
> > Song
> >
>



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux