> 2023年2月20日 16:27,mingzhe <mingzhe.zou@xxxxxxxxxxxx> 写道: > > > > 在 2023/2/19 17:39, Coly Li 写道: >>> 2023年1月27日 20:44,Andrea Tomassetti <andrea.tomassetti-opensource@xxxxxxxx> 写道: >>> >>> From 83f490ec8e81c840bdaf69e66021d661751975f2 Mon Sep 17 00:00:00 2001 >>> From: Andrea Tomassetti <andrea.tomassetti-opensource@xxxxxxxx> >>> Date: Thu, 8 Sep 2022 09:47:55 +0200 >>> Subject: [PATCH v2] bcache: Add support for live resize of backing devices >>> >>> Signed-off-by: Andrea Tomassetti <andrea.tomassetti-opensource@xxxxxxxx> >> Hi Andrea, >> I am fine with this patch and added it in my test queue now. Do you have an updated version, (e.g. more coding refine or adding commit log), then I can update my local version. >> BTW, it could be better if the patch will be sent out as a separated email. >> Thanks. >> Coly Li > Hi, Coly > > I posted some patchsets about online resize. > > -[PATCH v5 1/3] bcache: add dirty_data in struct bcache_device > -[PATCH v5 2/3] bcache: allocate stripe memory when partial_stripes_expensive is true > -[PATCH v5 3/3] bcache: support online resizing of cached_dev > > There are some differences: > 1. Create /sys/block/bcache0/bcache/size in sysfs to trigger resize > 2. Allocate stripe memory only if partial_stripes_expensive is true > 3. Simplify bcache_dev_sectors_dirty() > > Since the bcache superblock uses some sectors, the actual space of the bcache device is smaller than the backing. In order to provide a bcache device with a user-specified size, we need to create a backing device with a larger space, and then resize bcache. So resize can specify the size is very necessary. > > Yes, they are in my for-test queue already. I will test both and make a choice. Thanks. Coly Li [snipped]