Re: [PATCH 3/3] btrfs: remove root usage from can_overcommit

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

 



On Wed, May 17, 2017 at 11:38:36AM -0400, jeffm@xxxxxxxx wrote:
> From: Jeff Mahoney <jeffm@xxxxxxxx>
> 
> can_overcommit using the root to determine the allocation profile
> is the only use of a root in the call graph below reserve_metadata_bytes.
> 
> It turns out that we only need to know whether the allocation is for
> the chunk root or not -- and we can pass that around as a bool instead.
> 
> This allows us to pull root usage out of the reservation path all the
> way up to reserve_metadata_bytes itself, which uses it only to compare
> against fs_info->chunk_root to set the bool.  In turn, this eliminates
> a bunch of races where we use a particular root too early in the mount
> process.
> 
> Signed-off-by: Jeff Mahoney <jeffm@xxxxxxxx>

Reviewed-by: Liu Bo <bo.li.liu@xxxxxxxxxx>

Thanks,

-liubo
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux