Re: [PATCH v2 2/4] btrfs: Update per-profile available space when device size/used space get updated

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

 



On 1/2/20 6:27 AM, Qu Wenruo wrote:
There are 4 locations where device size or used space get updated:
- Chunk allocation
- Chunk removal
- Device grow
- Device shrink

Now also update per-profile available space at those timings.

For __btrfs_alloc_chunk() we can't acquire device_list_mutex as in
btrfs_finish_chunk_alloc() we could hold device_list_mutex and cause
dead lock.


These are protecting two different things though, holding the chunk_mutex doesn't keep things from being removed from the device list.

Looking at patch 1 can't we just do the device list traversal under RCU and then not have to worry about the locking at all? Thanks,

Josef



[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