linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bcache-tools: bcache-export-cached doesn't match backing device w/ offset, features
@ 2021-05-11 19:06 Marc Smith
  2021-06-03 15:05 ` Coly Li
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Smith @ 2021-05-11 19:06 UTC (permalink / raw)
  To: linux-bcache

updated the awk snippet used in 'bcache-export-cached' so it matches the three
current superblock versions of a "backing" device (BCACHE_SB_VERSION_BDEV,
BCACHE_SB_VERSION_BDEV_WITH_OFFSET, BCACHE_SB_VERSION_BDEV_WITH_FEATURES)

Signed-off-by: Marc A. Smith <marc.smith@quantum.com>
---
 bcache-export-cached | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bcache-export-cached b/bcache-export-cached
index b345922..e6c1bc3 100644
--- a/bcache-export-cached
+++ b/bcache-export-cached
@@ -19,7 +19,7 @@ for slave in "/sys/class/block/$DEVNAME/slaves"/*; do
             $1 == "dev.uuid" { uuid=$2; }
             $1 == "dev.label" && $2 != "(empty)" { label=$2; }
             END {
-                if (sbver == 1 && uuid) {
+                if ((sbver == 1 || sbver == 4 || sbver == 6) && uuid) {
                     print("CACHED_UUID=" uuid)
                     if (label) print("CACHED_LABEL=" label)
                     exit(0)
-- 
2.20.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] bcache-tools: bcache-export-cached doesn't match backing device w/ offset, features
  2021-05-11 19:06 [PATCH] bcache-tools: bcache-export-cached doesn't match backing device w/ offset, features Marc Smith
@ 2021-06-03 15:05 ` Coly Li
  0 siblings, 0 replies; 2+ messages in thread
From: Coly Li @ 2021-06-03 15:05 UTC (permalink / raw)
  To: Marc Smith, linux-bcache

On 5/12/21 3:06 AM, Marc Smith wrote:
> updated the awk snippet used in 'bcache-export-cached' so it matches the three
> current superblock versions of a "backing" device (BCACHE_SB_VERSION_BDEV,
> BCACHE_SB_VERSION_BDEV_WITH_OFFSET, BCACHE_SB_VERSION_BDEV_WITH_FEATURES)
>
> Signed-off-by: Marc A. Smith <marc.smith@quantum.com>
> ---
>  bcache-export-cached | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/bcache-export-cached b/bcache-export-cached
> index b345922..e6c1bc3 100644
> --- a/bcache-export-cached
> +++ b/bcache-export-cached
> @@ -19,7 +19,7 @@ for slave in "/sys/class/block/$DEVNAME/slaves"/*; do
>              $1 == "dev.uuid" { uuid=$2; }
>              $1 == "dev.label" && $2 != "(empty)" { label=$2; }
>              END {
> -                if (sbver == 1 && uuid) {
> +                if ((sbver == 1 || sbver == 4 || sbver == 6) && uuid) {
>                      print("CACHED_UUID=" uuid)
>                      if (label) print("CACHED_LABEL=" label)
>                      exit(0)

Applied. Thanks.

Coly Li

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-03 15:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 19:06 [PATCH] bcache-tools: bcache-export-cached doesn't match backing device w/ offset, features Marc Smith
2021-06-03 15:05 ` Coly Li

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).