- bcache.h: fix typo from SUUP to SUPP (jsc#SLE-9807) 0019-bcache.h-fix-typo-from-SUUP-to-SUPP.patch - bcache-tools: only call set_bucket_size() for cache device (jsc#SLE-9807) 0020-bcache-tools-only-call-set_bucket_size-for-cache-dev.patch - bcache.h: add BCH_FEATURE_INCOMPAT_LARGE_BUCKET to BCH_FEATURE_INCOMPAT_SUPP (jsc#SLE-9807) 0021-bcache.h-add-BCH_FEATURE_INCOMPAT_LARGE_BUCKET-to-BC.patch - bcache-tools: check incompatible feature set (jsc#SLE-9807) 0022-bcache-tools-check-incompatible-feature-set.patch - bcache-tools: introduce BCH_FEATURE_INCOMPAT_LOG_LARGE_BUCKET_SIZE for large bucket (jsc#SLE-9807) 0023-bcache-tools-introduce-BCH_FEATURE_INCOMPAT_LOG_LARG.patch - bcache-tools: display obsoleted bucket size configuration (jsc#SLE-9807) 0024-bcache-tools-display-obsoleted-bucket-size-configura.patch - bcache-tools: recover the missing sb.csum for showing bcache device super block (jsc#SLE-9807) 0025-bcache-tools-recover-the-missing-sb.csum-for-showing.patch - bcache-tools: only call to_cache_sb() for bcache device in may_add_item() (jsc#SLE-9807) 0026-bcache-tools-only-call-to_cache_sb-for-bcache-device.patch - bcache-tools: improve column alignment for "bcache show -m" output (jsc#SLE-9807) 0027-bcache-tools-improve-column-alignment-for-bcache-sho.patch OBS-URL: https://build.opensuse.org/request/show/860492 OBS-URL: https://build.opensuse.org/package/show/filesystems/bcache-tools?expand=0&rev=31
42 lines
1.2 KiB
Diff
42 lines
1.2 KiB
Diff
From 287e2a743ccded3916a97a631855b1368427d6ab Mon Sep 17 00:00:00 2001
|
|
From: Coly Li <colyli@suse.de>
|
|
Date: Tue, 29 Dec 2020 22:29:41 +0800
|
|
Subject: [PATCH 2/9] bcache-tools: only call set_bucket_size() for cache
|
|
device
|
|
Git-commit: 287e2a743ccded3916a97a631855b1368427d6ab
|
|
References: jsc#SLE-9807
|
|
|
|
It doesn't make sense to set bucket size for backing device, this patch
|
|
moves set_bucket_size() into the code block for cache device only.
|
|
|
|
Signed-off-by: Coly Li <colyli@suse.de>
|
|
|
|
---
|
|
make.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/make.c b/make.c
|
|
index ad89377..a3f97f6 100644
|
|
--- a/make.c
|
|
+++ b/make.c
|
|
@@ -340,7 +340,6 @@ static void write_sb(char *dev, unsigned int block_size,
|
|
uuid_generate(sb.uuid);
|
|
memcpy(sb.set_uuid, set_uuid, sizeof(sb.set_uuid));
|
|
|
|
- set_bucket_size(&sb, bucket_size);
|
|
sb.block_size = block_size;
|
|
|
|
uuid_unparse(sb.uuid, uuid_str);
|
|
@@ -383,6 +382,8 @@ static void write_sb(char *dev, unsigned int block_size,
|
|
data_offset);
|
|
putchar('\n');
|
|
} else {
|
|
+ set_bucket_size(&sb, bucket_size);
|
|
+
|
|
sb.nbuckets = getblocks(fd) / sb.bucket_size;
|
|
sb.nr_in_set = 1;
|
|
/* 23 is (SB_SECTOR + SB_SIZE) - 1 sectors */
|
|
--
|
|
2.26.2
|
|
|