Re: [PATCH 8/9] btrfs: make btrfs_submit_compressed_read() to determine stripe boundary at bio allocation time
From: Johannes Thumshirn <hidden>
Date: 2021-06-11 12:43:17
From: Johannes Thumshirn <hidden>
Date: 2021-06-11 12:43:17
On 11/06/2021 14:40, Qu Wenruo wrote:
On 2021/6/11 下午4:19, Johannes Thumshirn wrote:quoted
On 11/06/2021 10:16, Qu Wenruo wrote:quoted
Did you mean that for the bio_add_zone_append_page(), it may return less bytes than we expected? Even if our compressed write is ensured to be smaller than 128K?No it either adds the number of requested pages or it fails (I think there's and effort going on to make bio_add_page() and friends return bool so this is less confusing).BTW, I have a question about the add or not at all behavior. One of my concern is, if we're at the zone boundary (or what's the proper term?), and we want to add 4 sectors, but the zone boundary can only add one sector, and if we just submit current bio, wouldn't it cause some problem? E.g. we leave a one sector gap for the current zone. Will that be a problem?
The zoned allocator will take care of it. It'll fill the zone as good as possible or move the allocation to a new block group on a new zone.