* [PATCH] bcache-tools: make: permit only one cache device to be specified
@ 2020-08-22 16:31 Coly Li
2020-08-25 18:35 ` Nix
0 siblings, 1 reply; 2+ messages in thread
From: Coly Li @ 2020-08-22 16:31 UTC (permalink / raw)
To: linux-bcache; +Cc: Coly Li
Now a cache set only has a single cache, therefore "bache make" should
permit only one cache device to be specified for a cache set.
This patch checks if more than one cache devices are specified by "-C"
an error message "Please specify only one cache device" will be printed
and bcache exits with usage information.
Signed-off-by: Coly Li <colyli@suse.de>
---
make.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/make.c b/make.c
index 9631857..ad89377 100644
--- a/make.c
+++ b/make.c
@@ -604,6 +604,11 @@ int make_bcache(int argc, char **argv)
usage();
}
+ if (ncache_devices > 1) {
+ fprintf(stderr, "Please specify only one cache device\n");
+ usage();
+ }
+
if (bucket_size < block_size) {
fprintf(stderr,
"Bucket size cannot be smaller than block size\n");
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bcache-tools: make: permit only one cache device to be specified
2020-08-22 16:31 [PATCH] bcache-tools: make: permit only one cache device to be specified Coly Li
@ 2020-08-25 18:35 ` Nix
0 siblings, 0 replies; 2+ messages in thread
From: Nix @ 2020-08-25 18:35 UTC (permalink / raw)
To: Coly Li; +Cc: linux-bcache
On 22 Aug 2020, Coly Li said:
> Now a cache set only has a single cache, therefore "bache make" should
Typo: "bcache"
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-25 19:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-22 16:31 [PATCH] bcache-tools: make: permit only one cache device to be specified Coly Li
2020-08-25 18:35 ` Nix
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).