Re: pro/cons of raid1 with mdadm/lvm2

2014-12-01 Thread Russell Coker
On Mon, 1 Dec 2014, Chris Murphy li...@colorremedies.com wrote: On Sun, Nov 30, 2014 at 3:06 PM, Russell Coker russ...@coker.com.au wrote: When the 2 disks have different data mdadm has no way of knowing which one is correct and has a 50% chance of overwriting good data. But BTRFS does

Re: pro/cons of raid1 with mdadm/lvm2

2014-12-01 Thread Gour
On Mon, 01 Dec 2014 09:06:19 +1100 Russell Coker russ...@coker.com.au wrote: When the 2 disks have different data mdadm has no way of knowing which one is correct and has a 50% chance of overwriting good data. But BTRFS does checksums on all reads and solves the problem of corrupt data - as

Re: [PATCH-v4 1/7] vfs: split update_time() into update_time() and write_time()

2014-12-01 Thread Christoph Hellwig
On Thu, Nov 27, 2014 at 03:27:31PM -0500, Theodore Ts'o wrote: I can do that, but part of the reason why we were doing this rather involved set of changes was to allow other file systems to be able to take advantage of lazytime. I suppose there is value in allowing other file systems, such as

Re: pro/cons of raid1 with mdadm/lvm2

2014-12-01 Thread Gour
On Mon, 1 Dec 2014 10:42:36 +0500 Roman Mamedov r...@romanrm.net wrote: Pros: [...] Con: * You only get the ability to recover from a checksum failure with Btrfs RAID1, not with mdadm RAID1 (see Russell's reply). For the reasons you mentioned I'll keep my root under btrfs' native raid

Re: pro/cons of raid1 with mdadm/lvm2

2014-12-01 Thread Gour
On Sun, 30 Nov 2014 18:00:37 -0700 Chris Murphy li...@colorremedies.com wrote: Yeah. I'm not sure though if openSUSE 13.2 prevents users from creating btrfs raid1 volumes entirely, or if it's just an install time limitation. I was able to create btrfs raid1 volumes under lvm, but installer

[PATCH] Btrfs: fix wrong list access on the failure of reading out checksum

2014-12-01 Thread Miao Xie
If we failed to reading out the checksum, we would free all the checksums in the list. But the current code accessed the list head, not the entry in the list. Fix it. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/file-item.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [Lsf-pc] [LSF/MM TOPIC]: Btrfs: Decoupling block-size and page-size in BTRFS.

2014-12-01 Thread Christoph Hellwig
Is this topic relevant for the broarder FS community? Maybe the btrfs community should look into organizing a meeting co-hosted with Vault similar to what we did for ext4 and XFS in the past? -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to

Re: [PATCH] Btrfs: fix wrong list access on the failure of reading out checksum

2014-12-01 Thread Miao Xie
Please ignore this patch, Chris has fixed this problem. Thanks Miao On Mon, 1 Dec 2014 18:04:13 +0800, Miao Xie wrote: If we failed to reading out the checksum, we would free all the checksums in the list. But the current code accessed the list head, not the entry in the list. Fix it.

BRFS balance crash

2014-12-01 Thread Swâmi Petaramesh
Hi, I'm running Fedora Core 21 beta with kernel 3.17.4-300.fc21.x86_64 and Btrfs-progs-3.17-1.fc21.x86_64 As my SSD was pretty full, I started : btrfs balance start -dusage=75 -musage=75 / This ended in segmentation fault. Afterwards my system wouldn't access the disk anymore, and needed a

btrfs stuck with lot's of files

2014-12-01 Thread Peter Volkov
Hi, guys. We have a problem with btrfs file system: sometimes it became stuck without leaving me any way to interrupt it (shutdown -r now is unable to restart server). By stuck I mean some processes that previously were able to write on disk are unable to cope with load and load average goes up:

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Austin S Hemmelgarn
On 2014-11-29 16:21, John Williams wrote: On Sat, Nov 29, 2014 at 1:07 PM, Alex Elsayed eternal...@gmail.com wrote: I'd suggest looking more closely at the crypto api section of menuconfig - it already has crc32c, among others. Just because it's called the crypto api doesn't mean it only has

Re: Crazy idea of cleanup the inode_record btrfsck things with SQL?

2014-12-01 Thread Austin S Hemmelgarn
On 2014-11-30 20:58, Qu Wenruo wrote: [BACKGROUND] I'm trying to implement the function to repair missing inode item. Under that case, inode type must be salvaged(although it can be fallback to FILE). One case should be, if there is any dir_item/index or inode_ref refers the inode as parent,

PROBLEM: #89121 BTRFS mixes up mounted devices with their snapshots

2014-12-01 Thread MegaBrutal
Hi all, I've reported the bug I've previously posted about in BTRFS messes up snapshot LV with origin in the Kernel Bug Tracker. https://bugzilla.kernel.org/show_bug.cgi?id=89121 Since the other thread went off into theoretical debates about UUIDs and their generic relation to BTRFS, their

Re: Possible to undo subvol delete?

2014-12-01 Thread Austin S Hemmelgarn
On 2014-11-29 23:23, Marc MERLIN wrote: On Sun, Nov 30, 2014 at 09:03:14AM +0530, Shriramana Sharma wrote: IIUC with BtrFS while it is possible to easily undelete a file or ordinary directory if a snapshot of the containing subvol exists, it seems that it's not elementary to undelete a subvol

Re: Possible to undo subvol delete?

2014-12-01 Thread Shriramana Sharma
On Mon, Dec 1, 2014 at 6:42 PM, Austin S Hemmelgarn ahferro...@gmail.com wrote: We might want to consider adding an option to btrfs subvol del to ask for confirmation (or make it do so by default and add an option to disable asking for confirmation). I already reported:

Re: Possible to undo subvol delete?

2014-12-01 Thread MegaBrutal
2014-12-01 14:12 GMT+01:00 Austin S Hemmelgarn ahferro...@gmail.com: We might want to consider adding an option to btrfs subvol del to ask for confirmation (or make it do so by default and add an option to disable asking for confirmation). I've also noticed, a subvolume can just be deleted

Re: Possible to undo subvol delete?

2014-12-01 Thread Roman Mamedov
On Mon, 1 Dec 2014 18:49:23 +0530 Shriramana Sharma samj...@gmail.com wrote: As I requested there, I prefer for confirmation by default and -f to force otherwise, rather than behaviour of rm which requires -i to ask confirmation. And I prefer the current behavior (also replied on the bug). A

Re: Possible to undo subvol delete?

2014-12-01 Thread Roman Mamedov
On Mon, 1 Dec 2014 14:38:16 +0100 MegaBrutal megabru...@gmail.com wrote: I've also noticed, a subvolume can just be deleted with an rm -r, just like an ordinary directory. I'd consider to only allow subvolume deletions with exact btrfs subvolume delete commands, and they This is already the

Re: Possible to undo subvol delete?

2014-12-01 Thread Austin S Hemmelgarn
On 2014-12-01 08:38, MegaBrutal wrote: 2014-12-01 14:12 GMT+01:00 Austin S Hemmelgarn ahferro...@gmail.com: We might want to consider adding an option to btrfs subvol del to ask for confirmation (or make it do so by default and add an option to disable asking for confirmation). I've also

Re: Possible to undo subvol delete?

2014-12-01 Thread Holger Hoffstätte
On Mon, 01 Dec 2014 14:38:16 +0100, MegaBrutal wrote: I've also noticed, a subvolume can just be deleted with an rm -r, just like an ordinary directory. I'd consider to only allow subvolume Nope: rootbtrfs subvolume create foo Create subvolume './foo' roottouch foo/bla rootll foo total 0

Re: Possible to undo subvol delete?

2014-12-01 Thread MegaBrutal
2014-12-01 14:47 GMT+01:00 Roman Mamedov r...@romanrm.net: On Mon, 1 Dec 2014 14:38:16 +0100 MegaBrutal megabru...@gmail.com wrote: I've also noticed, a subvolume can just be deleted with an rm -r, just like an ordinary directory. I'd consider to only allow subvolume deletions with exact

Re: [Lsf-pc] [LSF/MM TOPIC]: Btrfs: Decoupling block-size and page-size in BTRFS.

2014-12-01 Thread Chris Mason
On Mon, Dec 1, 2014 at 5:13 AM, Christoph Hellwig h...@infradead.org wrote: Is this topic relevant for the broarder FS community? Maybe the btrfs community should look into organizing a meeting co-hosted with Vault similar to what we did for ext4 and XFS in the past? Yeah, this is a very

Online Drive Replacement: BTRFS with RAID 6

2014-12-01 Thread Oliver
Hi All, on a testing machine I installed four HDDs and they are configured as RAID6. For a test I removed one of the drives (/dev/sdk) while the volume was mounted and data was written to it. This worked well, as far as I can see. Some I/O errors were written to /var/log/syslog, but the

Re: [PATCH-v4 1/7] vfs: split update_time() into update_time() and write_time()

2014-12-01 Thread Theodore Ts'o
On Mon, Dec 01, 2014 at 01:28:10AM -0800, Christoph Hellwig wrote: The -is_readonly method seems like a clear winner to me, I'm all for adding it, and thus suggested moving it first in the series. It's a real winner for me as well, but the reason why I dropped it is because if btrfs() has to

Re: BTRFS messes up snapshot LV with origin

2014-12-01 Thread Zygo Blaxell
On Fri, Nov 28, 2014 at 11:55:07PM -0800, Robert White wrote: On 11/28/2014 08:59 PM, Zygo Blaxell wrote: On Fri, Nov 28, 2014 at 06:05:48PM +0100, Goffredo Baroncelli wrote: On 11/27/2014 05:15 AM, Zygo Blaxell wrote: This is a weakness of the current udev and asynchronous device hotplug

Re: BRFS balance crash

2014-12-01 Thread Swâmi Petaramesh
Hi, I got another kernel crash during a balance, this time with a nice kernel bug...: déc. 01 16:19:09 vajra kernel: [ cut here ] déc. 01 16:19:09 vajra kernel: WARNING: CPU: 0 PID: 5396 at fs/btrfs/extent- tree.c:876 btrfs_lookup_extent_info+0x4c6/0x4e0 [btrfs]() déc.

[PATCH RFC v2] btrfs: add sysfs layout to show volume info

2014-12-01 Thread Anand Jain
From: Anand Jain anand.j...@oracle.com Not yet ready for integration, but for review and testing of the new sysfs layout which is currently under /sys/fs/btrfs/by_fsid This patch makes btrfs_fs_devices and btrfs_device information readable from sysfs. This uses the sysfs group visible entry

Re: Possible to undo subvol delete?

2014-12-01 Thread Shriramana Sharma
On Mon, Dec 1, 2014 at 7:16 PM, Roman Mamedov r...@romanrm.net wrote: A more sensible idea could be adding a global-level '-i' switch, same as in 'rm', so that you or distros could then alias 'btrfs' to 'btrfs -i' (ask confirmation on any irreversible action). Well the difference being that

Re: Possible to undo subvol delete?

2014-12-01 Thread Shriramana Sharma
On Mon, Dec 1, 2014 at 7:24 PM, MegaBrutal megabru...@gmail.com wrote: If you want to make snapshots which can't be removed by ordinary tools, use the 'read-only' mode when creating them. Yeah, good idea! Anyway, is it possible to change a read-only snapshot to read-write and vica-versa, or

[PATCH v2 5/6] Btrfs: fix race between writing free space cache and trimming

2014-12-01 Thread Filipe Manana
Trimming is completely transactionless, and the way it operates consists of hiding free space entries from a block group, perform the trim/discard and then make the free space entries visible again. Therefore while a free space entry is being trimmed, we can have free space cache writing running

[PATCH] Btrfs: fix extent map leak on chunk allocation failure

2014-12-01 Thread Filipe Manana
On error, after adding the extent map to the tree and to the pending chunks list, we would leave decrementing the extent map's refcount by 2 instead of 3 (our allocation + tree reference + list reference). Detected by 'rmmod btrfs': [20770.105881] kmem_cache_destroy btrfs_extent_map: Slab cache

[PATCH] Btrfs: fix memory leak after block remove + trimming

2014-12-01 Thread Filipe Manana
There was a free space entry structure memeory leak if a block group is remove while a free space entry is being trimmed, which the following diagram explains: CPU 1 CPU 2 btrfs_trim_block_group() trim_no_bitmap() remove free

[PATCH] fstests: add btrfs test to stress chunk allocation/removal and fstrim

2014-12-01 Thread Filipe Manana
Stress btrfs' block group allocation and deallocation while running fstrim in parallel. Part of the goal is also to get data block groups deallocated so that new metadata block groups, using the same physical device space ranges, get allocated while fstrim is running. This caused several issues

Re: [PATCH-v4 1/7] vfs: split update_time() into update_time() and write_time()

2014-12-01 Thread David Sterba
On Mon, Dec 01, 2014 at 10:04:50AM -0500, Theodore Ts'o wrote: On Mon, Dec 01, 2014 at 01:28:10AM -0800, Christoph Hellwig wrote: The -is_readonly method seems like a clear winner to me, I'm all for adding it, and thus suggested moving it first in the series. It's a real winner for me

Re: Possible to undo subvol delete?

2014-12-01 Thread Robert White
On 12/01/2014 08:40 AM, Shriramana Sharma wrote: IIUC you can only specify RO while creating but you can always cheaply create a RW snapshot of an RO one or an RO snapshot of an RW one... You can turn ReadOnly status on and off (er. true and false) with btrfs property get/set ro=true/false

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread John Williams
On Mon, Dec 1, 2014 at 4:39 AM, Austin S Hemmelgarn ahferro...@gmail.com wrote: Just because it's a filesystem doesn't always mean that speed is the most important thing. Personally, I can think of multiple cases where using a cryptographically strong hash would be preferable, for example:

Re: Possible to undo subvol delete?

2014-12-01 Thread Austin S Hemmelgarn
On 2014-12-01 08:54, MegaBrutal wrote: 2014-12-01 14:47 GMT+01:00 Roman Mamedov r...@romanrm.net: On Mon, 1 Dec 2014 14:38:16 +0100 MegaBrutal megabru...@gmail.com wrote: I've also noticed, a subvolume can just be deleted with an rm -r, just like an ordinary directory. I'd consider to only

Re: PROBLEM: #89121 BTRFS mixes up mounted devices with their snapshots

2014-12-01 Thread Robert White
On 12/01/2014 04:56 AM, MegaBrutal wrote: Since the other thread went off into theoretical debates about UUIDs and their generic relation to BTRFS, their everyday use cases, and the philosophical meaning behind uniqueness of copies and UUIDs; I'd like to specifically ask you to only post here

Re: Possible to undo subvol delete?

2014-12-01 Thread David Sterba
On Mon, Dec 01, 2014 at 08:50:09AM -0500, Austin S Hemmelgarn wrote: It would not surprise me though if RHEL or SuSE had patched the kernel to allow using rm on a subvolume. This would be quite a big change in behaviour that we would not do without taking it upstream first. -- To unsubscribe

Re: [PATCH RFC v2] btrfs: add sysfs layout to show volume info

2014-12-01 Thread Goffredo Baroncelli
Hi Anand, On 12/01/2014 06:33 PM, Anand Jain wrote: From: Anand Jain anand.j...@oracle.com Not yet ready for integration, but for review and testing of the new sysfs layout which is currently under /sys/fs/btrfs/by_fsid This patch makes btrfs_fs_devices and btrfs_device information

Re: Possible to undo subvol delete?

2014-12-01 Thread David Sterba
On Mon, Dec 01, 2014 at 08:12:02AM -0500, Austin S Hemmelgarn wrote: On 2014-11-29 23:23, Marc MERLIN wrote: On Sun, Nov 30, 2014 at 09:03:14AM +0530, Shriramana Sharma wrote: IIUC with BtrFS while it is possible to easily undelete a file or ordinary directory if a snapshot of the

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Austin S Hemmelgarn
On 2014-12-01 12:22, John Williams wrote: On Mon, Dec 1, 2014 at 4:39 AM, Austin S Hemmelgarn ahferro...@gmail.com wrote: Just because it's a filesystem doesn't always mean that speed is the most important thing. Personally, I can think of multiple cases where using a cryptographically strong

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread John Williams
On Mon, Dec 1, 2014 at 9:42 AM, Austin S Hemmelgarn Except most of the CPU optimized hashes aren't crypto hashes (other than the various SHA implementations). Furthermore, I've actually tested the speed of a generic CRC32c implementation versus SHA-1 using the SHA instructions on an

Re: ToS page does not exist?

2014-12-01 Thread David Sterba
On Sun, Nov 30, 2014 at 09:21:26AM +0530, Shriramana Sharma wrote: I am asked to read the ToS before signing up on the wiki: Make sure that you first read the Terms of Service before requesting an account. ... but the link is red and the page does not exist. Reported to kernel.org

Re: Crazy idea of cleanup the inode_record btrfsck things with SQL?

2014-12-01 Thread Robert White
On 11/30/2014 10:18 PM, Qu Wenruo wrote: (advocacy for using SQL internally for btrfsck) All of these ideas you want to toss a entire SQL front end on are more simply handled with simple data structures. In C++ terms mapinode,parent and/or mapparent,vectorchildren beats the heck out of

Re: [PATCH v2 5/5] btrfs: enable swap file support

2014-12-01 Thread David Sterba
On Mon, Nov 24, 2014 at 02:03:02PM -0800, Omar Sandoval wrote: Alright, I took a look at this. My understanding is that a PREALLOC extent represents a region on disk that has already been allocated but isn't in use yet, but please correct me if I'm wrong. Judging by this comment in

Re: pro/cons of raid1 with mdadm/lvm2

2014-12-01 Thread Robert White
On 12/01/2014 01:26 AM, Gour wrote: On Mon, 01 Dec 2014 09:06:19 +1100 Russell Coker russ...@coker.com.au wrote: When the 2 disks have different data mdadm has no way of knowing which one is correct and has a 50% chance of overwriting good data. But BTRFS does checksums on all reads and solves

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread David Sterba
On Wed, Nov 26, 2014 at 08:58:50AM -0500, Austin S Hemmelgarn wrote: On 2014-11-26 08:38, Brendan Hide wrote: On 2014/11/25 18:47, David Sterba wrote: We could provide an interface for external applications that would make use of the strong checksums. Eg. external dedup, integrity db. The

Re: btrfs stuck with lot's of files

2014-12-01 Thread Robert White
On 12/01/2014 03:46 AM, Peter Volkov wrote: Hi, guys. (stuff about getting hung up trying to write to one drive) That drive (/dev/sdn) is probably starting to fail. Some older drives basically go unresponsive when they start to go bad. Particularly if they've gone bad enough to have run out

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread David Sterba
On Thu, Nov 27, 2014 at 11:52:20AM +0800, Liu Bo wrote: There are several checksum algorithms that trade off speed and strength so we may want to support more than just sha256. Easy to add but I'd rather see them added in all at once than one by one. Another question is if we'd like to

Re: scrub implies failing drive - smartctl blissfully unaware

2014-12-01 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/25/2014 6:13 PM, Chris Murphy wrote: The drive will only issue a read error when its ECC absolutely cannot recover the data, hard fail. A few years ago companies including Western Digital started shipping large cheap drives, think of the

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
John Williams wrote: On Mon, Dec 1, 2014 at 9:42 AM, Austin S Hemmelgarn Except most of the CPU optimized hashes aren't crypto hashes (other than the various SHA implementations). Furthermore, I've actually tested the speed of a generic CRC32c implementation versus SHA-1 using the SHA

Re: Online Drive Replacement: BTRFS with RAID 6

2014-12-01 Thread Robert White
On 12/01/2014 06:47 AM, Oliver wrote: Hi All, on a testing machine I installed four HDDs and they are configured as RAID6. For a test I removed one of the drives (/dev/sdk) while the volume was mounted and data was written to it. This worked well, as far as I can see. Some I/O errors were

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
Alex Elsayed wrote: * He was comparing CRC32 (a 32-bit non-cryptographic hash, *via the Crypto API*) against SHA-1 (a 128-bit cryptographic hash, via the Crypto API), and SHA-1 _still_ won. CRC32 tends to beat the pants off 128-bit non- cryptographic hashes simply because those require

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread John Williams
On Mon, Dec 1, 2014 at 11:28 AM, Alex Elsayed eternal...@gmail.com wrote: I think there's a fundamental set of points being missed. That may be true, but it is not me who is missing them. * The Crypto API can be used to access non-cryptographic hashes. Full stop. Irrelevant to my point. I am

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
John Williams wrote: On Mon, Dec 1, 2014 at 11:28 AM, Alex Elsayed eternal...@gmail.com wrote: I think there's a fundamental set of points being missed. That may be true, but it is not me who is missing them. * The Crypto API can be used to access non-cryptographic hashes. Full stop.

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Austin S Hemmelgarn
On 2014-12-01 13:37, David Sterba wrote: On Wed, Nov 26, 2014 at 08:58:50AM -0500, Austin S Hemmelgarn wrote: On 2014-11-26 08:38, Brendan Hide wrote: On 2014/11/25 18:47, David Sterba wrote: We could provide an interface for external applications that would make use of the strong checksums.

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread John Williams
On Mon, Dec 1, 2014 at 12:08 PM, Alex Elsayed eternal...@gmail.com wrote: Actually, I said Sure here, but this isn't strictly true. At some point, you're more memory-bound than CPU-bound, and with CPU intrinsic instructions (like SPARC and recent x86 have for SHA) you're often past that. Then,

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread John Williams
On Mon, Dec 1, 2014 at 12:35 PM, Austin S Hemmelgarn ahferro...@gmail.com wrote: My only reasoning is that with this set of hashes (crc32c, adler32, and md5), the statistical likely-hood of running into a hash collision with more than one of them at a time is infinitesimally small compared to

Kernel lockup: fs/btrfs/delayed-inoce.c:1410 btrfs_assert_delayed_root_empty

2014-12-01 Thread Bernardo Donadio
Hi, I'm having fairly frequent kernel lockups caused by btrfs, which I think it might be a serious bug. I'm using linux-3.17.3.200.fc20.x86_64. It freezes the whole system, and spits the error trace in the journal a few seconds later. Here's the journal log, notice that there are 2 stack

Re: PROBLEM: #89121 BTRFS mixes up mounted devices with their snapshots

2014-12-01 Thread Konstantin
MegaBrutal schrieb am 01.12.2014 um 13:56: Hi all, I've reported the bug I've previously posted about in BTRFS messes up snapshot LV with origin in the Kernel Bug Tracker. https://bugzilla.kernel.org/show_bug.cgi?id=89121 Hi MegaBrutal. If I understand your report correctly, I can give you

Re: PROBLEM: #89121 BTRFS mixes up mounted devices with their snapshots

2014-12-01 Thread MegaBrutal
2014-12-01 18:27 GMT+01:00 Robert White rwh...@pobox.com: On 12/01/2014 04:56 AM, MegaBrutal wrote: Since the other thread went off into theoretical debates about UUIDs and their generic relation to BTRFS, their everyday use cases, and the philosophical meaning behind uniqueness of copies and

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
John Williams wrote: On Mon, Dec 1, 2014 at 12:08 PM, Alex Elsayed eternal...@gmail.com wrote: Actually, I said Sure here, but this isn't strictly true. At some point, you're more memory-bound than CPU-bound, and with CPU intrinsic instructions (like SPARC and recent x86 have for SHA) you're

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
John Williams wrote: On Mon, Dec 1, 2014 at 12:08 PM, Alex Elsayed eternal...@gmail.com wrote: Actually, I said Sure here, but this isn't strictly true. At some point, you're more memory-bound than CPU-bound, and with CPU intrinsic instructions (like SPARC and recent x86 have for SHA) you're

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
John Williams wrote: On Mon, Dec 1, 2014 at 12:35 PM, Austin S Hemmelgarn ahferro...@gmail.com wrote: My only reasoning is that with this set of hashes (crc32c, adler32, and md5), the statistical likely-hood of running into a hash collision with more than one of them at a time is

Re: PROBLEM: #89121 BTRFS mixes up mounted devices with their snapshots

2014-12-01 Thread Robert White
On 12/01/2014 02:10 PM, MegaBrutal wrote: Since having duplicate UUIDs on devices is not a problem for me since I can tell them apart by LVM names, the discussion is of little relevance to my use case. Of course it's interesting and I like to read it along, it is not about the actual problem at

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread John Williams
On Mon, Dec 1, 2014 at 3:05 PM, Alex Elsayed eternal...@gmail.com wrote: Incidentally, you can be 'skeptical' all you like - per Austin's message upthread, he was testing the Crypto API. Thus, skeptical as you may be, hard evidence shows that SHA-1 was equal to or faster than CRC32, which is

Re: [PATCH RFC v2] btrfs: add sysfs layout to show volume info

2014-12-01 Thread anand jain
Hi Goffredo, inline below.. On 02/12/2014 01:29, Goffredo Baroncelli wrote: Hi Anand, On 12/01/2014 06:33 PM, Anand Jain wrote: From: Anand Jain anand.j...@oracle.com Not yet ready for integration, but for review and testing of the new sysfs layout which is currently under

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
John Williams wrote: On Mon, Dec 1, 2014 at 3:05 PM, Alex Elsayed eternal...@gmail.com wrote: Incidentally, you can be 'skeptical' all you like - per Austin's message upthread, he was testing the Crypto API. Thus, skeptical as you may be, hard evidence shows that SHA-1 was equal to or faster

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread John Williams
On Mon, Dec 1, 2014 at 3:05 PM, Alex Elsayed eternal...@gmail.com wrote: hard evidence shows that SHA-1 was equal to or faster than CRC32, which is unequivocally simpler and faster than CityHash (though CityHash comes close). And the CPUs in question are *not* particularly rare - Intel since

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
John Williams wrote: On Mon, Dec 1, 2014 at 3:05 PM, Alex Elsayed eternal...@gmail.com wrote: Incidentally, you can be 'skeptical' all you like - per Austin's message upthread, he was testing the Crypto API. Thus, skeptical as you may be, hard evidence shows that SHA-1 was equal to or faster

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread John Williams
On Mon, Dec 1, 2014 at 3:46 PM, Alex Elsayed eternal...@gmail.com wrote: And I'm not sure what is convoluted or incorrect about saying Look, empirical evidence! No empirical evidence of the speed of SpookyHash or CityHash versus SHA-1 was cited. The only empirical data mentioned was on an

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
John Williams wrote: On Mon, Dec 1, 2014 at 3:05 PM, Alex Elsayed eternal...@gmail.com wrote: hard evidence shows that SHA-1 was equal to or faster than CRC32, which is unequivocally simpler and faster than CityHash (though CityHash comes close). And the CPUs in question are *not*

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread John Williams
On Mon, Dec 1, 2014 at 3:46 PM, Alex Elsayed eternal...@gmail.com wrote: And that _is_ the case; they are faster... *when both are software implementations* They are also faster when both are optimized to use special instructions of the CPU. According to this Intel whitepaper, SHA-1 does not

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
Alex Elsayed wrote: So CityHash is - at best - half as fast as SHA1 with acceleration. In fact, on the Apple A7, it would likely be slower than _software_ SHA-1. Argh, ignore this. The CityHash readme is in bytes/cycle, which I missed on first readthrough (why on earth they are not using

Re: PROBLEM: #89121 BTRFS mixes up mounted devices with their snapshots

2014-12-01 Thread MegaBrutal
2014-12-02 0:24 GMT+01:00 Robert White rwh...@pobox.com: On 12/01/2014 02:10 PM, MegaBrutal wrote: Since having duplicate UUIDs on devices is not a problem for me since I can tell them apart by LVM names, the discussion is of little relevance to my use case. Of course it's interesting and I

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread John Williams
On Mon, Dec 1, 2014 at 4:06 PM, Alex Elsayed eternal...@gmail.com wrote: https://github.com/openssl/openssl/blob/master/crypto/sha/asm/sha1-armv8.pl # hardware-assisted software(*) # Apple A72.31 4.13 (+14%) # Cortex-A53 2.19 8.73 (+108%) #

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
John Williams wrote: On Mon, Dec 1, 2014 at 3:46 PM, Alex Elsayed eternal...@gmail.com wrote: And I'm not sure what is convoluted or incorrect about saying Look, empirical evidence! No empirical evidence of the speed of SpookyHash or CityHash versus SHA-1 was cited. The only empirical data

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Christoph Anton Mitterer
On Sat, 2014-11-29 at 13:00 -0800, John Williams wrote: On Sat, Nov 29, 2014 at 12:38 PM, Alex Elsayed eternal...@gmail.com wrote: Why not just use the kernel crypto API? Then the user can just specify any hash the kernel supports. One reason is that crytographic hashes are an order of

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread John Williams
On Mon, Dec 1, 2014 at 4:15 PM, Alex Elsayed eternal...@gmail.com wrote: There's a thing called the transitive property. When CRC32 is faster than SpookyHash and CityHash (while admittedly weaker), and SHA-1 on SPARC is faster than CRC32, there are comparisons that can be made. And yet you

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
John Williams wrote: On Mon, Dec 1, 2014 at 4:15 PM, Alex Elsayed eternal...@gmail.com wrote: There's a thing called the transitive property. When CRC32 is faster than SpookyHash and CityHash (while admittedly weaker), and SHA-1 on SPARC is faster than CRC32, there are comparisons that can be

Re: Crazy idea of cleanup the inode_record btrfsck things with SQL?

2014-12-01 Thread Qu Wenruo
Original Message Subject: Re: Crazy idea of cleanup the inode_record btrfsck things with SQL? From: Austin S Hemmelgarn ahferro...@gmail.com To: Qu Wenruo quwen...@cn.fujitsu.com, linux-btrfs linux-btrfs@vger.kernel.org Date: 2014年12月01日 20:53 On 2014-11-30 20:58, Qu Wenruo

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
Christoph Anton Mitterer wrote: On Sat, 2014-11-29 at 13:00 -0800, John Williams wrote: On Sat, Nov 29, 2014 at 12:38 PM, Alex Elsayed eternal...@gmail.com wrote: Why not just use the kernel crypto API? Then the user can just specify any hash the kernel supports. One reason is that

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Christoph Anton Mitterer
On Mon, 2014-12-01 at 16:43 -0800, Alex Elsayed wrote: including that MAC-then-encrypt is fragile against a number of attacks, mainly in the padding-oracle category (See: TLS BEAST attack). Well but here we talk about disk encryption... how would the MtE oracle problems apply to that? Either

Re: Crazy idea of cleanup the inode_record btrfsck things with SQL?

2014-12-01 Thread Qu Wenruo
Original Message Subject: Re: Crazy idea of cleanup the inode_record btrfsck things with SQL? From: Robert White rwh...@pobox.com To: Qu Wenruo quwen...@cn.fujitsu.com, linux-btrfs linux-btrfs@vger.kernel.org Date: 2014年12月02日 02:10 On 11/30/2014 10:18 PM, Qu Wenruo wrote:

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
Christoph Anton Mitterer wrote: On Mon, 2014-12-01 at 16:43 -0800, Alex Elsayed wrote: including that MAC-then-encrypt is fragile against a number of attacks, mainly in the padding-oracle category (See: TLS BEAST attack). Well but here we talk about disk encryption... how would the MtE

Re: [RFC PATCH] Btrfs: add sha256 checksum option

2014-12-01 Thread Alex Elsayed
Alex Elsayed wrote: Christoph Anton Mitterer wrote: On Mon, 2014-12-01 at 16:43 -0800, Alex Elsayed wrote: including that MAC-then-encrypt is fragile against a number of attacks, mainly in the padding-oracle category (See: TLS BEAST attack). Well but here we talk about disk encryption...

Re: btrfs stuck with lot's of files

2014-12-01 Thread Qu Wenruo
Original Message Subject: btrfs stuck with lot's of files From: Peter Volkov p...@gentoo.org To: linux-btrfs@vger.kernel.org linux-btrfs@vger.kernel.org Date: 2014年12月01日 19:46 Hi, guys. We have a problem with btrfs file system: sometimes it became stuck without leaving me

Re: btrfs stuck with lot's of files

2014-12-01 Thread Peter Volkov
В Вт, 02/12/2014 в 09:33 +0800, Qu Wenruo пишет: Original Message Subject: btrfs stuck with lot's of files From: Peter Volkov p...@gentoo.org To: linux-btrfs@vger.kernel.org linux-btrfs@vger.kernel.org Date: 2014年12月01日 19:46 Hi, guys. We have a problem with btrfs file

Re: [PATCH] fstests: add btrfs test to stress chunk allocation/removal and fstrim

2014-12-01 Thread Eryu Guan
On Mon, Dec 01, 2014 at 05:11:29PM +, Filipe Manana wrote: Stress btrfs' block group allocation and deallocation while running fstrim in parallel. Part of the goal is also to get data block groups deallocated so that new metadata block groups, using the same physical device space ranges,

Re: Possible to undo subvol delete?

2014-12-01 Thread Zygo Blaxell
On Mon, Dec 01, 2014 at 10:09:44PM +0530, Shriramana Sharma wrote: On Mon, Dec 1, 2014 at 7:16 PM, Roman Mamedov r...@romanrm.net wrote: A more sensible idea could be adding a global-level '-i' switch, same as in 'rm', so that you or distros could then alias 'btrfs' to 'btrfs -i' (ask

Re: Moving an entire subvol?

2014-12-01 Thread Shriramana Sharma
On Mon, Dec 1, 2014 at 6:24 AM, Chris Murphy li...@colorremedies.com wrote: But isn't it just possible to move i.e. reparent a subvol so I can move these two under another subvol and have that as default? You can move subvolumes. OK so I just found out that just mv test1/foo test2/ where

Re: Possible to undo subvol delete?

2014-12-01 Thread Shriramana Sharma
On Tue, Dec 2, 2014 at 8:44 AM, Zygo Blaxell ce3g8...@umail.furryterror.org wrote: This is consistent with the way lvm2 and mdadm work when presented with data-losing or otherwise questionable commands and parameters. It will break scripts, but btrfs users should still be expecting that for a

Re: Possible to undo subvol delete?

2014-12-01 Thread MegaBrutal
2014-12-01 17:39 GMT+01:00 Shriramana Sharma samj...@gmail.com: When btrfs has so many features (esp snapshots) to prevent user accidentally deleting data (I liked especially http://www.youtube.com/v/9H7e6BcI5Fo?start=209) I think there has to be *some* modicum of support for warning against

Re: Possible to undo subvol delete?

2014-12-01 Thread MegaBrutal
2014-12-02 4:40 GMT+01:00 Shriramana Sharma samj...@gmail.com: Well in office environs, where the root password is with a certain person only, then that's fine because that person is going to be wary of doing anything that's make others angry at them, but on single-user systems, one's regular

Re: PROBLEM: #89121 BTRFS mixes up mounted devices with their snapshots

2014-12-01 Thread MegaBrutal
2014-12-01 22:45 GMT+01:00 Konstantin newsbox1...@web.de: MegaBrutal schrieb am 01.12.2014 um 13:56: Hi all, I've reported the bug I've previously posted about in BTRFS messes up snapshot LV with origin in the Kernel Bug Tracker. https://bugzilla.kernel.org/show_bug.cgi?id=89121 Hi

Re: Possible to undo subvol delete?

2014-12-01 Thread Marc MERLIN
On Tue, Dec 02, 2014 at 06:33:38AM +0100, MegaBrutal wrote: 2014-12-01 17:39 GMT+01:00 Shriramana Sharma samj...@gmail.com: When btrfs has so many features (esp snapshots) to prevent user accidentally deleting data (I liked especially http://www.youtube.com/v/9H7e6BcI5Fo?start=209) I

BTRFS equivalent for tune2fs?

2014-12-01 Thread MegaBrutal
Hi all, I know there is a btrfstune, but it doesn't provide all the functionality I'm thinking of. For ext2/3/4 file systems I can get a bunch of useful data with tune2fs -l. How can I retrieve the same type of information about a BTRFS file system? (E.g., last mount time, last checked time,

Re: Possible to undo subvol delete?

2014-12-01 Thread Satoru Takeuchi
Hi, (2014/11/30 12:33), Shriramana Sharma wrote: IIUC with BtrFS while it is possible to easily undelete a file or ordinary directory if a snapshot of the containing subvol exists, it seems that it's not elementary to undelete a subvol itself, because all subvols are under the root-level subvol

Re: BTRFS equivalent for tune2fs?

2014-12-01 Thread Brendan Hide
On 2014/12/02 07:54, MegaBrutal wrote: Hi all, I know there is a btrfstune, but it doesn't provide all the functionality I'm thinking of. For ext2/3/4 file systems I can get a bunch of useful data with tune2fs -l. How can I retrieve the same type of information about a BTRFS file system?

  1   2   >