<snip>
Then we can create a cached_dev with bcache1 (flash dev) as backing dev.
$ make-bcache -B /dev/bcache1
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vdf 252:80 0 50G 0 disk
├─bcache0 251:0 0 100G 0 disk
└─bcache1 251:128 0 100G 0 disk
└─bcache2 251:256 0 100G 0 disk
As a result there is a cached device bcache2 with backing device of a
flash device bcache1.
----------------------------
| bcache2 (cached_dev) |
| ------------------------ |
| | sdb (cache_dev) | |
| ------------------------ |
| ------------------------ |
| | bcache1 (flash_dev)| |
| ------------------------ |
----------------------------
Does this allow an arbitrary depth of bcache stacking?
-Eric
More than 2 layers we did not test, but should be allowed.
mingzhe
Signed-off-by: Dongsheng Yang <dongsheng.yang@xxxxxxxxxxxx>
Signed-off-by: mingzhe <mingzhe.zou@xxxxxxxxxxxx>
---
drivers/md/bcache/super.c | 40 +++++++++++++++++++++++++++++++++++----
1 file changed, 36 insertions(+), 4 deletions(-)
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index ba3909bb6bea..0ca8c05831c9 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
<snip>
Hi All,
I've not seen this commit appear in the mainline kernel yet. In 2023,
only this commit changed super.c in 2023:
2023-04-25 block/drivers: remove dead clear of random flag
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/md/bcache/super.c?h=v6.4-rc4
What's preventing this patch from going into the mainline kernel?
Cheers,
Cedric
_________________________________________________________________
________________________________________________________
Your E-Mail. Your Cloud. Your Office. eclipso Mail & Cloud. https://www.eclipso.de