public inbox for linux-bcache@vger.kernel.org
 help / color / mirror / Atom feed
* bcache-tools package for Fedora
@ 2013-08-25 19:07 Rolf Fokkens
       [not found] ` <521A55D4.20908-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Rolf Fokkens @ 2013-08-25 19:07 UTC (permalink / raw)
  To: linux-bcache-u79uwXL29TY76Z2rM5mHXA

Hi!

To allow Fedora users to benefit from bcache I'm currently packaging 
bcache-tools for Fedora.

See also: https://bugzilla.redhat.com/show_bug.cgi?id=999690

Any suggestions or other feedback is welcome. Whenever I run into 
something relevant, I'll share it with the mail list.

Rolf Fokkens

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

* Re: [RFC] bcache-status
       [not found] ` <521A55D4.20908-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
@ 2013-08-25 20:39   ` Rolf Fokkens
       [not found]     ` <521A6B92.60001-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
  2013-09-05  6:53   ` bcache-tools package for Fedora / status probe-bcache Rolf Fokkens
  1 sibling, 1 reply; 19+ messages in thread
From: Rolf Fokkens @ 2013-08-25 20:39 UTC (permalink / raw)
  To: linux-bcache-u79uwXL29TY76Z2rM5mHXA

Hi,

I took the liberty of adding bcache-status to the bcache-tools package 
I'm building:

https://bugzilla.redhat.com/show_bug.cgi?id=999690#c12

I have a few questions/remarks:
- Is the python3 dependency really needed? I changed it to ordinary 
python(2) and it runs fine I think.
- Is https://gist.github.com/damoxc/6267899 the proper source?
- When the bcache kernel module is not loaded, the feedback looks buggy:
[root@home07 ~]# bcache-status
Traceback (most recent call last):
   File "/sbin/bcache-status", line 348, in <module>
     main()
   File "/sbin/bcache-status", line 333, in main
     for cache in os.listdir(SYSFS_BCACHE_PATH):
OSError: [Errno 2] No such file or directory: '/sys/fs/bcache/'
[root@home07 ~]#

Rolf

On 08/25/2013 09:07 PM, Rolf Fokkens wrote:
> To allow Fedora users to benefit from bcache I'm currently packaging 
> bcache-tools for Fedora.
>
> See also: https://bugzilla.redhat.com/show_bug.cgi?id=999690

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

* Re: [RFC] bcache-status
       [not found]     ` <521A6B92.60001-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
@ 2013-08-26 16:30       ` Darrick J. Wong
       [not found]         ` <20130826163055.GB4780-yuuUpGxbzT9UbpRmUfBrXUB+6BGkLq7r@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Darrick J. Wong @ 2013-08-26 16:30 UTC (permalink / raw)
  To: Rolf Fokkens; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA

On Sun, Aug 25, 2013 at 10:39:46PM +0200, Rolf Fokkens wrote:
> Hi,
> 
> I took the liberty of adding bcache-status to the bcache-tools
> package I'm building:

Yay! :)

> https://bugzilla.redhat.com/show_bug.cgi?id=999690#c12
> 
> I have a few questions/remarks:
> - Is the python3 dependency really needed? I changed it to ordinary
> python(2) and it runs fine I think.

Not required; I'm merely writing new scripts in python3.  (At least when I can
find py3 libraries...)  I didn't write anything py3-specific, as far as I know.

> - Is https://gist.github.com/damoxc/6267899 the proper source?

I was hoping someone will (eventually) commit the status tool to
bcache-tools.git.

For now, there's: https://gist.github.com/djwong/6343451 in which I've merged
all the changes made by the two people who (thank you both!) provided
modifications.

> - When the bcache kernel module is not loaded, the feedback looks buggy:
> [root@home07 ~]# bcache-status
> Traceback (most recent call last):
>   File "/sbin/bcache-status", line 348, in <module>
>     main()
>   File "/sbin/bcache-status", line 333, in main
>     for cache in os.listdir(SYSFS_BCACHE_PATH):
> OSError: [Errno 2] No such file or directory: '/sys/fs/bcache/'
> [root@home07 ~]#

Yeah, I fixed that before posting the gist. :)

--D
> 
> Rolf
> 
> On 08/25/2013 09:07 PM, Rolf Fokkens wrote:
> >To allow Fedora users to benefit from bcache I'm currently
> >packaging bcache-tools for Fedora.
> >
> >See also: https://bugzilla.redhat.com/show_bug.cgi?id=999690
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RFC] bcache-status
       [not found]         ` <20130826163055.GB4780-yuuUpGxbzT9UbpRmUfBrXUB+6BGkLq7r@public.gmane.org>
@ 2013-08-26 20:36           ` Rolf Fokkens
       [not found]             ` <521BBC3B.9010003-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
  2013-08-26 23:01           ` Rolf Fokkens
  1 sibling, 1 reply; 19+ messages in thread
From: Rolf Fokkens @ 2013-08-26 20:36 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA

On 08/26/2013 06:30 PM, Darrick J. Wong wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=999690#c12
>
> I have a few questions/remarks:
> - Is the python3 dependency really needed? I changed it to ordinary
> python(2) and it runs fine I think.
> Not required; I'm merely writing new scripts in python3.  (At least when I can
> find py3 libraries...)  I didn't write anything py3-specific, as far as I know.
Would you consider putting python in the header instead of python3? 
Having python3 in the heading adds the requirement to install python3, 
and I think python2 is (still) more standard. For Fedora 20 I think it 
is anyway, which means I have to patch it everytime I want to package it.
> For now, there's: https://gist.github.com/djwong/6343451 in which I've merged
> all the changes made by the two people who (thank you both!) provided
> modifications.
>
> Yeah, I fixed that before posting the gist. :) --D 
Thanks, I'll update the package!

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

* Re: [RFC] bcache-status
       [not found]         ` <20130826163055.GB4780-yuuUpGxbzT9UbpRmUfBrXUB+6BGkLq7r@public.gmane.org>
  2013-08-26 20:36           ` Rolf Fokkens
@ 2013-08-26 23:01           ` Rolf Fokkens
  1 sibling, 0 replies; 19+ messages in thread
From: Rolf Fokkens @ 2013-08-26 23:01 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA

On 08/26/2013 06:30 PM, Darrick J. Wong wrote:
>
> I was hoping someone will (eventually) commit the status tool to
> bcache-tools.git.

Because packaging for Fedora requires it, I created a man page for 
bcache-status:

http://bdsync.rolf-fokkens.nl/bcache-tools-0-0.7.20130820git/bcache-status.8

maybe this helps to get it in the bcache-tools git. Another argument: 
It's a very useful tool, users will like it!

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

* Re: [RFC] bcache-status
       [not found]             ` <521BBC3B.9010003-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
@ 2013-08-29  0:46               ` Darrick J. Wong
       [not found]                 ` <20130829004646.GA3099-yuuUpGxbzT9UbpRmUfBrXUB+6BGkLq7r@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Darrick J. Wong @ 2013-08-29  0:46 UTC (permalink / raw)
  To: Rolf Fokkens; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA

On Mon, Aug 26, 2013 at 10:36:11PM +0200, Rolf Fokkens wrote:
> On 08/26/2013 06:30 PM, Darrick J. Wong wrote:
> >https://bugzilla.redhat.com/show_bug.cgi?id=999690#c12
> >
> >I have a few questions/remarks:
> >- Is the python3 dependency really needed? I changed it to ordinary
> >python(2) and it runs fine I think.
> >Not required; I'm merely writing new scripts in python3.  (At least when I can
> >find py3 libraries...)  I didn't write anything py3-specific, as far as I know.
> Would you consider putting python in the header instead of python3?
> Having python3 in the heading adds the requirement to install
> python3, and I think python2 is (still) more standard. For Fedora 20
> I think it is anyway, which means I have to patch it everytime I
> want to package it.

Sure.  Go ahead and take the '3' out of hashbang.  (Gist updated.)

--D

> >For now, there's: https://gist.github.com/djwong/6343451 in which I've merged
> >all the changes made by the two people who (thank you both!) provided
> >modifications.
> >
> >Yeah, I fixed that before posting the gist. :) --D
> Thanks, I'll update the package!
> 

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

* Re: [RFC] bcache-status
       [not found]                 ` <20130829004646.GA3099-yuuUpGxbzT9UbpRmUfBrXUB+6BGkLq7r@public.gmane.org>
@ 2013-09-03 20:46                   ` Rolf Fokkens
       [not found]                     ` <52264AAD.3050401-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Rolf Fokkens @ 2013-09-03 20:46 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA

Hi,

bcache-status renders some weird output:

- "Total Cache Used" and "Total Cache Unused" don't always add up to 
"Total Cache Size"
- "Dirty Data" is -6 MB?

Seems like bugs to me. Details below.

Rolf

[root@localhost bcache]# bcache-status -s
--- bcache ---
UUID c318c0b2-0b69-4f66-a729-23b82a9d0e91
Block Size                  0.00KiB
Bucket Size                 512.00KiB
Congested?                  False
Read Congestion             2.0ms
Write Congestion            20.0ms
Total Cache Size            1.00GiB
Total Cache Used            20.00MiB    (1%)
Total Cache Unused          1.00GiB    (99%)
Dirty Data                  0B    (0%)
Evictable Cache             1.00GiB    (100%)
Replacement Policy          [lru] fifo random
Cache Mode                  [writethrough] writeback writearound none
Total Hits                  122    (100%)
Total Misses                0
Total Bypass Hits           0
Total Bypass Misses         0
Total Bypassed              0B
--- Backing Device ---
   Device File               /dev/sda3 (8:3)
   bcache Device File        /dev/bcache1 (252:1)
   Size                      7.00GiB
   Cache Mode                [writethrough] writeback writearound none
   Readahead                 0
   Sequential Cutoff         4.00MiB
   Merge sequential?         True
   State                     clean
   Writeback?                True
   Dirty Data                0B
   Total Hits                122    (100%)
   Total Misses              0
   Total Bypass Hits         0
   Total Bypass Misses       0
   Total Bypassed            0B
--- Cache Device ---
   Device File               /dev/sdb1 (8:17)
   Size                      1.00GiB
   Block Size                0.00KiB
   Bucket Size               512.00KiB
   Replacement Policy        [lru] fifo random
   Discard?                  False
   I/O Errors                0
   Metadata Written          1.00KiB
   Data Written              0B
   Buckets                   4094
   Cache Used                20.00MiB    (1%)
   Cache Unused              1.00GiB    (99%)
--- bcache ---
UUID d07cd9a1-6211-4bba-bc37-a8ba8858ef4d
Block Size                  0.00KiB
Bucket Size                 512.00KiB
Congested?                  False
Read Congestion             2.0ms
Write Congestion            20.0ms
Total Cache Size            1.00GiB
Total Cache Used            204.00MiB    (10%)
Total Cache Unused          1.00GiB    (90%)
Dirty Data                  0B    (0%)
Evictable Cache             1.00GiB    (100%)
Replacement Policy          [lru] fifo random
Cache Mode                  writethrough [writeback] writearound none
Total Hits                  1365    (81%)
Total Misses                318
Total Bypass Hits           3191    (100%)
Total Bypass Misses         0
Total Bypassed              46.00MiB
--- Backing Device ---
   Device File               /dev/sdc1 (8:33)
   bcache Device File        /dev/bcache0 (252:0)
   Size                      19.00GiB
   Cache Mode                writethrough [writeback] writearound none
   Readahead                 0
   Sequential Cutoff         0B
   Merge sequential?         True
   State                     dirty
   Writeback?                True
   Dirty Data                -6.00MiB
   Total Hits                1365    (81%)
   Total Misses              318
   Total Bypass Hits         3191    (100%)
   Total Bypass Misses       0
   Total Bypassed            46.00MiB
--- Cache Device ---
   Device File               /dev/sdd1 (8:49)
   Size                      1.00GiB
   Block Size                0.00KiB
   Bucket Size               512.00KiB
   Replacement Policy        [lru] fifo random
   Discard?                  False
   I/O Errors                0
   Metadata Written          281.00KiB
   Data Written              18.00MiB
   Buckets                   4094
   Cache Used                204.00MiB    (10%)
   Cache Unused              1.00GiB    (90%)
[root@localhost bcache]#

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

* Re: [RFC] bcache-status
       [not found]                     ` <52264AAD.3050401-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
@ 2013-09-04 20:26                       ` Darrick J. Wong
       [not found]                         ` <20130904202600.GA4554-yuuUpGxbzT9UbpRmUfBrXUB+6BGkLq7r@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Darrick J. Wong @ 2013-09-04 20:26 UTC (permalink / raw)
  To: Rolf Fokkens; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA

On Tue, Sep 03, 2013 at 10:46:37PM +0200, Rolf Fokkens wrote:
> Hi,
> 
> bcache-status renders some weird output:
> 
> - "Total Cache Used" and "Total Cache Unused" don't always add up to
> "Total Cache Size"

Yeah... I calculate total cache size, then cache-used = cache-size * whatever
percentage bcache reports.  It won't add up exactly due to rounding errors.
0.999 -> 1.00.  That's rather a lot, really.

> - "Dirty Data" is -6 MB?

I think this was fixed in 3.11.

--D
> 
> Seems like bugs to me. Details below.
> 
> Rolf
> 
> [root@localhost bcache]# bcache-status -s
> --- bcache ---
> UUID c318c0b2-0b69-4f66-a729-23b82a9d0e91
> Block Size                  0.00KiB
> Bucket Size                 512.00KiB
> Congested?                  False
> Read Congestion             2.0ms
> Write Congestion            20.0ms
> Total Cache Size            1.00GiB
> Total Cache Used            20.00MiB    (1%)
> Total Cache Unused          1.00GiB    (99%)
> Dirty Data                  0B    (0%)
> Evictable Cache             1.00GiB    (100%)
> Replacement Policy          [lru] fifo random
> Cache Mode                  [writethrough] writeback writearound none
> Total Hits                  122    (100%)
> Total Misses                0
> Total Bypass Hits           0
> Total Bypass Misses         0
> Total Bypassed              0B
> --- Backing Device ---
>   Device File               /dev/sda3 (8:3)
>   bcache Device File        /dev/bcache1 (252:1)
>   Size                      7.00GiB
>   Cache Mode                [writethrough] writeback writearound none
>   Readahead                 0
>   Sequential Cutoff         4.00MiB
>   Merge sequential?         True
>   State                     clean
>   Writeback?                True
>   Dirty Data                0B
>   Total Hits                122    (100%)
>   Total Misses              0
>   Total Bypass Hits         0
>   Total Bypass Misses       0
>   Total Bypassed            0B
> --- Cache Device ---
>   Device File               /dev/sdb1 (8:17)
>   Size                      1.00GiB
>   Block Size                0.00KiB
>   Bucket Size               512.00KiB
>   Replacement Policy        [lru] fifo random
>   Discard?                  False
>   I/O Errors                0
>   Metadata Written          1.00KiB
>   Data Written              0B
>   Buckets                   4094
>   Cache Used                20.00MiB    (1%)
>   Cache Unused              1.00GiB    (99%)
> --- bcache ---
> UUID d07cd9a1-6211-4bba-bc37-a8ba8858ef4d
> Block Size                  0.00KiB
> Bucket Size                 512.00KiB
> Congested?                  False
> Read Congestion             2.0ms
> Write Congestion            20.0ms
> Total Cache Size            1.00GiB
> Total Cache Used            204.00MiB    (10%)
> Total Cache Unused          1.00GiB    (90%)
> Dirty Data                  0B    (0%)
> Evictable Cache             1.00GiB    (100%)
> Replacement Policy          [lru] fifo random
> Cache Mode                  writethrough [writeback] writearound none
> Total Hits                  1365    (81%)
> Total Misses                318
> Total Bypass Hits           3191    (100%)
> Total Bypass Misses         0
> Total Bypassed              46.00MiB
> --- Backing Device ---
>   Device File               /dev/sdc1 (8:33)
>   bcache Device File        /dev/bcache0 (252:0)
>   Size                      19.00GiB
>   Cache Mode                writethrough [writeback] writearound none
>   Readahead                 0
>   Sequential Cutoff         0B
>   Merge sequential?         True
>   State                     dirty
>   Writeback?                True
>   Dirty Data                -6.00MiB
>   Total Hits                1365    (81%)
>   Total Misses              318
>   Total Bypass Hits         3191    (100%)
>   Total Bypass Misses       0
>   Total Bypassed            46.00MiB
> --- Cache Device ---
>   Device File               /dev/sdd1 (8:49)
>   Size                      1.00GiB
>   Block Size                0.00KiB
>   Bucket Size               512.00KiB
>   Replacement Policy        [lru] fifo random
>   Discard?                  False
>   I/O Errors                0
>   Metadata Written          281.00KiB
>   Data Written              18.00MiB
>   Buckets                   4094
>   Cache Used                204.00MiB    (10%)
>   Cache Unused              1.00GiB    (90%)
> [root@localhost bcache]#
> 

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

* Re: [RFC] bcache-status
       [not found]                         ` <20130904202600.GA4554-yuuUpGxbzT9UbpRmUfBrXUB+6BGkLq7r@public.gmane.org>
@ 2013-09-04 20:52                           ` Rolf Fokkens
       [not found]                             ` <52279DA5.7050505-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Rolf Fokkens @ 2013-09-04 20:52 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA

I'm not sure if I understand.

On 09/04/2013 10:26 PM, Darrick J. Wong wrote:
> Yeah... I calculate total cache size, then cache-used = cache-size * whatever
> percentage bcache reports.  It won't add up exactly due to rounding errors.
> 0.999 -> 1.00.  That's rather a lot, really.
Is the following (snippet of the output I sent) the result of rounding 
errors?

Total Cache Size            1.00GiB
Total Cache Used            204.00MiB    (10%)
Total Cache Unused          1.00GiB    (90%)

I mean: the percentages are 10% and 90%..

>> - "Dirty Data" is -6 MB?
> I think this was fixed in 3.11.
OK, so that is a kernel issue.

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

* Re: [RFC] bcache-status
       [not found]                             ` <52279DA5.7050505-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
@ 2013-09-05  6:14                               ` Stefan Priebe - Profihost AG
  2013-09-09 22:45                               ` Darrick J. Wong
  1 sibling, 0 replies; 19+ messages in thread
From: Stefan Priebe - Profihost AG @ 2013-09-05  6:14 UTC (permalink / raw)
  To: Rolf Fokkens
  Cc: Darrick J. Wong, linux-bcache-u79uwXL29TY76Z2rM5mHXA,
	Kent Overstreet

Am 04.09.2013 22:52, schrieb Rolf Fokkens:
> I'm not sure if I understand.
> 
> On 09/04/2013 10:26 PM, Darrick J. Wong wrote:
>> Yeah... I calculate total cache size, then cache-used = cache-size *
>> whatever
>> percentage bcache reports.  It won't add up exactly due to rounding
>> errors.
>> 0.999 -> 1.00.  That's rather a lot, really.
> Is the following (snippet of the output I sent) the result of rounding
> errors?
> 
> Total Cache Size            1.00GiB
> Total Cache Used            204.00MiB    (10%)
> Total Cache Unused          1.00GiB    (90%)
> 
> I mean: the percentages are 10% and 90%..
> 
>>> - "Dirty Data" is -6 MB?
>> I think this was fixed in 3.11.
> OK, so that is a kernel issue.

Any chance to get this fixed in 3.10 stable kernel too?

Stefan

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

* Re: bcache-tools package for Fedora / status probe-bcache
       [not found] ` <521A55D4.20908-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
  2013-08-25 20:39   ` [RFC] bcache-status Rolf Fokkens
@ 2013-09-05  6:53   ` Rolf Fokkens
       [not found]     ` <52282A87.4000801-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
  1 sibling, 1 reply; 19+ messages in thread
From: Rolf Fokkens @ 2013-09-05  6:53 UTC (permalink / raw)
  To: linux-bcache-u79uwXL29TY76Z2rM5mHXA

Hi,

Packaging is progressing well, an initial package is available: 
https://admin.fedoraproject.org/updates/bcache-tools-0-0.9.20130827git.fc20

probe-bcache is part of this package, but util-linux will obsolete this 
shortly: https://bugzilla.redhat.com/show_bug.cgi?id=1001120#c13 
Actually the blkid utility in util-linux will do a more thorough job on 
identifying bcache, e.g. by also checking the csum. Having blkid 
identify bcache also simplifies the bcache udev rules.

So now I'm wondering: are there any particular reasons to keep 
probe-bcache part of the package, or will it really be obsolete?

Rolf

On 08/25/2013 09:07 PM, Rolf Fokkens wrote:
> Hi!
>
> To allow Fedora users to benefit from bcache I'm currently packaging 
> bcache-tools for Fedora.
>
> See also: https://bugzilla.redhat.com/show_bug.cgi?id=999690
>
> Any suggestions or other feedback is welcome. Whenever I run into 
> something relevant, I'll share it with the mail list.
>
> Rolf Fokkens
>

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

* Re: bcache-tools package for Fedora / status probe-bcache
       [not found]     ` <52282A87.4000801-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
@ 2013-09-05 10:16       ` Gabriel de Perthuis
       [not found]         ` <52285A03.7080802-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Gabriel de Perthuis @ 2013-09-05 10:16 UTC (permalink / raw)
  To: Rolf Fokkens; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA

> Hi,
> 
> Packaging is progressing well, an initial package is available:
> https://admin.fedoraproject.org/updates/bcache-tools-0-0.9.20130827git.fc20
>
>  probe-bcache is part of this package, but util-linux will obsolete
> this shortly: https://bugzilla.redhat.com/show_bug.cgi?id=1001120#c13
> Actually the blkid utility in util-linux will do a more thorough job
> on identifying bcache, e.g. by also checking the csum. Having blkid
> identify bcache also simplifies the bcache udev rules.

I'm not a fan of a blkid csum check (I pointed it out on the bug[1]).
If a superblock gets scribbled or corrupted, you want bcache to
complain, and you don't want blkid to look for the next possible
signature.

> So now I'm wondering: are there any particular reasons to keep
> probe-bcache part of the package, or will it really be obsolete?

If you address the above and tweak the udev rules, why not.

The upstream repo will need to keep probe-bcache for a while
longer, because we don't have a way to require a sufficiently
recent libblkid.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1001120#c9

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

* Re: bcache-tools package for Fedora / status probe-bcache
       [not found]         ` <52285A03.7080802-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-09-05 10:36           ` Rolf Fokkens
       [not found]             ` <FEBD3400-93F1-4286-8BE8-45D5413C2EA2-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Rolf Fokkens @ 2013-09-05 10:36 UTC (permalink / raw)
  To: Gabriel de Perthuis; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org


> 
> I'm not a fan of a blkid csum check (I pointed it out on the bug[1]).
> If a superblock gets scribbled or corrupted, you want bcache to
> complain, and you don't want blkid to look for the next possible
> signature.
Having blkid also verify the csum was requested by Karel Zak, the maintainer of util-linux. As a packager of bcache-tools I'm in favour of having blkid identify bcache, but I don't have a preference on using csum to identify bcache. I can pass the message to Karel, but it would be better if we both discuss it on the appropriate (util-linux?) mail list.
> 
>> So now I'm wondering: are there any particular reasons to keep
>> probe-bcache part of the package, or will it really be obsolete?
> 
> If you address the above and tweak the udev rules, why not.
> 
> The upstream repo will need to keep probe-bcache for a while
> longer, because we don't have a way to require a sufficiently
> recent libblkid.

I agree, f20 is a specific case, but in general probe-bcache will be needed for a while.
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1001120#c9

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

* Re: bcache-tools package for Fedora / status probe-bcache
       [not found]             ` <FEBD3400-93F1-4286-8BE8-45D5413C2EA2-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
@ 2013-09-05 10:53               ` Gabriel de Perthuis
       [not found]                 ` <52286299.7000708-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Gabriel de Perthuis @ 2013-09-05 10:53 UTC (permalink / raw)
  To: Karel Zak
  Cc: Rolf Fokkens,
	linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, util-linux

>> I'm not a fan of a blkid csum check (I pointed it out on the 
>> bug[1]). If a superblock gets scribbled or corrupted, you want 
>> bcache to complain, and you don't want blkid to look for the next 
>> possible signature.
> 
> Having blkid also verify the csum was requested by Karel Zak, the 
> maintainer of util-linux. As a packager of bcache-tools I'm in favour
> of having blkid identify bcache, but I don't have a preference on
> using csum to identify bcache. I can pass the message to Karel, but
> it would be better if we both discuss it on the appropriate 
> (util-linux?) mail list.

Karel, are you okay if blkid doesn't do the csum verification discussed above?
Checksum failures will be reported by the kernel instead.
Alternatively, do you see a way libblkid can return good magic / bad checksum
results?

>>> So now I'm wondering: are there any particular reasons to keep 
>>> probe-bcache part of the package, or will it really be obsolete?
>> 
>> If you address the above and tweak the udev rules, why not.
>> 
>> The upstream repo will need to keep probe-bcache for a while 
>> longer, because we don't have a way to require a sufficiently 
>> recent libblkid.
> 
> I agree, f20 is a specific case, but in general probe-bcache will be 
> needed for a while.

For the record, the libblkid patch is a good thing in the long run:
common interface, less forks in udev.

>> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1001120#c9

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: bcache-tools package for Fedora / status probe-bcache
       [not found]                 ` <52286299.7000708-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-09-09 13:26                   ` Karel Zak
       [not found]                     ` <20130909132653.GA8061-s5vVilr7EKH/9pzu0YdTqQ@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Karel Zak @ 2013-09-09 13:26 UTC (permalink / raw)
  To: Gabriel de Perthuis
  Cc: Rolf Fokkens,
	linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, util-linux

On Thu, Sep 05, 2013 at 12:53:13PM +0200, Gabriel de Perthuis wrote:
> >> I'm not a fan of a blkid csum check (I pointed it out on the 
> >> bug[1]). If a superblock gets scribbled or corrupted, you want 
> >> bcache to complain, and you don't want blkid to look for the next 
> >> possible signature.
> > 
> > Having blkid also verify the csum was requested by Karel Zak, the 
> > maintainer of util-linux. As a packager of bcache-tools I'm in favour
> > of having blkid identify bcache, but I don't have a preference on
> > using csum to identify bcache. I can pass the message to Karel, but
> > it would be better if we both discuss it on the appropriate 
> > (util-linux?) mail list.
> 
> Karel, are you okay if blkid doesn't do the csum verification discussed above?

 I don't insist on csum, but I'd like to have something more robust
 than check for a magic string only. It's usually better if there
 is some additional thing (for example within superblock offset,
 csum, etc.) -- checksums are ideal because it usually verifies 
 whole superblock (header). 
 
> Checksum failures will be reported by the kernel instead.

 I don't care about kernel :-) The important is what userspace (udev)
 thinks about the device -- is it correct to trigger any action on
 broken bcache device or the device should be ignored by userspace
 rules?

> Alternatively, do you see a way libblkid can return good magic / bad checksum
> results?

 If I good understand your patches then it makes wipefs(8) more
 "hungry" to zap incomplete superblock. I have no problem to support
 this scenario. 
 
 Something else (like report bad checksums to udev) is probably
 unnecessary. Right?

> > I agree, f20 is a specific case, but in general probe-bcache will be 
> > needed for a while.
> 
> For the record, the libblkid patch is a good thing in the long run:
> common interface, less forks in udev.

 Yes, definitely. 
 
 Maybe we can backport the patch to F20 if you need it -- it's not too
 invasive change. 

    Karel

-- 
 Karel Zak  <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: bcache-tools package for Fedora / status probe-bcache
       [not found]                     ` <20130909132653.GA8061-s5vVilr7EKH/9pzu0YdTqQ@public.gmane.org>
@ 2013-09-09 15:28                       ` Gabriel de Perthuis
       [not found]                         ` <522DE939.5090009-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Gabriel de Perthuis @ 2013-09-09 15:28 UTC (permalink / raw)
  To: Karel Zak
  Cc: Rolf Fokkens,
	linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, util-linux

lun. 09 sept. 2013 15:26:53 CEST, Karel Zak a écrit :
> On Thu, Sep 05, 2013 at 12:53:13PM +0200, Gabriel de Perthuis wrote:
>>>> I'm not a fan of a blkid csum check (I pointed it out on the 
>>>> bug[1]). If a superblock gets scribbled or corrupted, you want 
>>>> bcache to complain, and you don't want blkid to look for the next 
>>>> possible signature.
>>>
>>> Having blkid also verify the csum was requested by Karel Zak, the 
>>> maintainer of util-linux. As a packager of bcache-tools I'm in favour
>>> of having blkid identify bcache, but I don't have a preference on
>>> using csum to identify bcache. I can pass the message to Karel, but
>>> it would be better if we both discuss it on the appropriate 
>>> (util-linux?) mail list.
>>
>> Karel, are you okay if blkid doesn't do the csum verification discussed above?
>
>  I don't insist on csum, but I'd like to have something more robust
>  than check for a magic string only. It's usually better if there
>  is some additional thing (for example within superblock offset,
>  csum, etc.) -- checksums are ideal because it usually verifies 
>  whole superblock (header). 
>  
>> Checksum failures will be reported by the kernel instead.
>
>  I don't care about kernel :-) The important is what userspace (udev)
>  thinks about the device -- is it correct to trigger any action on
>  broken bcache device or the device should be ignored by userspace
>  rules?

It's correct insofar as current consumers expect it, and it's better
for error reporting.  The patches took care of my other objections,
so you can keep the crc check and go with what's on
https://github.com/g2p/util-linux/commits
(the csum patches I sent + Rolf's patch + a patch that depends on both).

>> Alternatively, do you see a way libblkid can return good magic / bad checksum
>> results?
>
>  If I good understand your patches then it makes wipefs(8) more
>  "hungry" to zap incomplete superblock. I have no problem to support
>  this scenario.

The second patch does that, and the first one also prevents exposing
nested data when a csum is broken, which was a dangerous failure mode.

>  Something else (like report bad checksums to udev) is probably
>  unnecessary. Right?

It would be good to have, because silent boot failures suck.
Maybe as a tweak to udev's embedded blkid?

>>> I agree, f20 is a specific case, but in general probe-bcache will be 
>>> needed for a while.
>>
>> For the record, the libblkid patch is a good thing in the long run:
>> common interface, less forks in udev.
>
>  Yes, definitely. 
>  
>  Maybe we can backport the patch to F20 if you need it -- it's not too
>  invasive change. 

(Letting Rolf field this one)

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

* Re: [RFC] bcache-status
       [not found]                             ` <52279DA5.7050505-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
  2013-09-05  6:14                               ` Stefan Priebe - Profihost AG
@ 2013-09-09 22:45                               ` Darrick J. Wong
  1 sibling, 0 replies; 19+ messages in thread
From: Darrick J. Wong @ 2013-09-09 22:45 UTC (permalink / raw)
  To: Rolf Fokkens; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA

On Wed, Sep 04, 2013 at 10:52:53PM +0200, Rolf Fokkens wrote:
> I'm not sure if I understand.
> 
> On 09/04/2013 10:26 PM, Darrick J. Wong wrote:
> >Yeah... I calculate total cache size, then cache-used = cache-size * whatever
> >percentage bcache reports.  It won't add up exactly due to rounding errors.
> >0.999 -> 1.00.  That's rather a lot, really.
> Is the following (snippet of the output I sent) the result of
> rounding errors?
> 
> Total Cache Size            1.00GiB
> Total Cache Used            204.00MiB    (10%)
> Total Cache Unused          1.00GiB    (90%)
> 
> I mean: the percentages are 10% and 90%..

Oops, this was a Py3 v. Py2 issue -- Python3 saw the '%.2f' in the function
that pretty-printed cache sizes and would fp-divide the two integers, whereas
Pyhon2 saw that we were trying to divide two integers and used integer
division. Fixed in the Gist.

Kent: Any chance you'd like to pick up bcache-status into bcache-tools.git?

(Or really, anyone who has commit access to that repo.)

--D
> 
> >>- "Dirty Data" is -6 MB?
> >I think this was fixed in 3.11.
> OK, so that is a kernel issue.

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

* Re: bcache-tools package for Fedora / status probe-bcache
       [not found]                         ` <522DE939.5090009-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-09-11 11:59                           ` Rolf Fokkens
  2013-09-11 15:51                           ` Karel Zak
  1 sibling, 0 replies; 19+ messages in thread
From: Rolf Fokkens @ 2013-09-11 11:59 UTC (permalink / raw)
  To: Gabriel de Perthuis, Karel Zak
  Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, util-linux

Op 09-09-13 17:28 schreef Gabriel de Perthuis <g2p.code-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:

>> Maybe we can backport the patch to F20 if you need it -- it's not too
>>  invasive change.
>
>(Letting Rolf field this one)

Most important for me is to have bcache identification by blkid in before
F20, so the udev rules file doesn't have to call bcache-probe. Whether or
not it uses checksums is not the most important thing, and that aspect
might even change later.

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

* Re: bcache-tools package for Fedora / status probe-bcache
       [not found]                         ` <522DE939.5090009-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2013-09-11 11:59                           ` Rolf Fokkens
@ 2013-09-11 15:51                           ` Karel Zak
  1 sibling, 0 replies; 19+ messages in thread
From: Karel Zak @ 2013-09-11 15:51 UTC (permalink / raw)
  To: Gabriel de Perthuis
  Cc: Rolf Fokkens,
	linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, util-linux

On Mon, Sep 09, 2013 at 05:28:57PM +0200, Gabriel de Perthuis wrote:
> It's correct insofar as current consumers expect it, and it's better
> for error reporting.  The patches took care of my other objections,
> so you can keep the crc check and go with what's on
> https://github.com/g2p/util-linux/commits
> (the csum patches I sent + Rolf's patch + a patch that depends on both).

Merged with some changes

 - not added blkid_probe_is_badcsum() the info about bad csum is
   exported by SBBADCSUM=1 variable, you have to use for example:

       if (blkid_probe_has_value(pr, "SBBADCSUM"))....

 - the usage type is BLKID_USAGE_OTHER rather than "raid" (we have some
   special exceptions and tests for raids that are unnecessary for
   bcache)

I have also added the test images from Rolf to util-linux test suite.

 $ blkid -o udev -p  tests/output/blkid/images-fs/bcache-C.img 
 ID_FS_UUID=7a343627-ac87-4bf0-b76f-46067cbc9b8c
 ID_FS_UUID_ENC=7a343627-ac87-4bf0-b76f-46067cbc9b8c
 ID_FS_TYPE=bcache
 ID_FS_USAGE=other

Thanks!

    Karel

-- 
 Karel Zak  <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2013-09-11 15:51 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-25 19:07 bcache-tools package for Fedora Rolf Fokkens
     [not found] ` <521A55D4.20908-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-08-25 20:39   ` [RFC] bcache-status Rolf Fokkens
     [not found]     ` <521A6B92.60001-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-08-26 16:30       ` Darrick J. Wong
     [not found]         ` <20130826163055.GB4780-yuuUpGxbzT9UbpRmUfBrXUB+6BGkLq7r@public.gmane.org>
2013-08-26 20:36           ` Rolf Fokkens
     [not found]             ` <521BBC3B.9010003-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-08-29  0:46               ` Darrick J. Wong
     [not found]                 ` <20130829004646.GA3099-yuuUpGxbzT9UbpRmUfBrXUB+6BGkLq7r@public.gmane.org>
2013-09-03 20:46                   ` Rolf Fokkens
     [not found]                     ` <52264AAD.3050401-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-09-04 20:26                       ` Darrick J. Wong
     [not found]                         ` <20130904202600.GA4554-yuuUpGxbzT9UbpRmUfBrXUB+6BGkLq7r@public.gmane.org>
2013-09-04 20:52                           ` Rolf Fokkens
     [not found]                             ` <52279DA5.7050505-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-09-05  6:14                               ` Stefan Priebe - Profihost AG
2013-09-09 22:45                               ` Darrick J. Wong
2013-08-26 23:01           ` Rolf Fokkens
2013-09-05  6:53   ` bcache-tools package for Fedora / status probe-bcache Rolf Fokkens
     [not found]     ` <52282A87.4000801-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-09-05 10:16       ` Gabriel de Perthuis
     [not found]         ` <52285A03.7080802-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-05 10:36           ` Rolf Fokkens
     [not found]             ` <FEBD3400-93F1-4286-8BE8-45D5413C2EA2-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-09-05 10:53               ` Gabriel de Perthuis
     [not found]                 ` <52286299.7000708-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-09 13:26                   ` Karel Zak
     [not found]                     ` <20130909132653.GA8061-s5vVilr7EKH/9pzu0YdTqQ@public.gmane.org>
2013-09-09 15:28                       ` Gabriel de Perthuis
     [not found]                         ` <522DE939.5090009-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-11 11:59                           ` Rolf Fokkens
2013-09-11 15:51                           ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox