Re: [PATCH 1/2] btrfs: don't start transaction for scrub if the fs is mounted read-only

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

 



On Wed, Jan 05, 2022 at 06:13:09AM +0800, Qu Wenruo wrote:
> >>> Should this also verify or at least assert that do_chunk_alloc is not
> >>> set? The scrub code is used for replace that can set the parameter to
> >>> true.
> >>
> >> Replace start needs RW mount, thus we don't need to bother replace in
> >> this case.
> >
> > What if replace starts on rw mount, and then it's flipped to read-only?
> > I don't see how this is prevented (like by mnt_want_write). It should
> > not cause any problems either, as it would not start the transaction.
> 
> For this case, there are 2 entrances:
> 
> - Remount RO
>    We will stop replace in that case
> 
> - Some fs error (like trans abort)
>    I believe we should fail at any transaction start.

Right, thanks, that was the missing piece.



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux