[PATCH v5 3/5] btrfs: Add zstd support

2017-08-09 Thread Nick Terrell
Add zstd compression and decompression support to BtrFS. zstd at its fastest level compresses almost as well as zlib, while offering much faster compression and decompression, approaching lzo speeds. I benchmarked btrfs with zstd compression against no compression, lzo compression, and zlib

[PATCH v5 1/5] lib: Add xxhash module

2017-08-09 Thread Nick Terrell
Adds xxhash kernel module with xxh32 and xxh64 hashes. xxhash is an extremely fast non-cryptographic hash algorithm for checksumming. The zstd compression and decompression modules added in the next patch require xxhash. I extracted it out from zstd since it is useful on its own. I copied the code

[PATCH v5 0/5] Add xxhash and zstd modules

2017-08-09 Thread Nick Terrell
Hi all, This patch set adds xxhash, zstd compression, and zstd decompression modules. It also adds zstd support to BtrFS and SquashFS. Each patch has relevant summaries, benchmarks, and tests. Best, Nick Terrell Changelog: v1 -> v2: - Make pointer in lib/xxhash.c:394 non-const (1/5) - Use

Re: btrfs issue with mariadb incremental backup

2017-08-09 Thread siranee . ja
I'll test and response the result to you soon. I have another question about the combination within Host lxd ubuntu and lxd container centos Host Machine X (16.04.3 LTS with lxd 2.0.10 and btrfs-progs v4.4 kernel 4.4 ) set 1 lvm raw partitions and format to btrfs filesystem (on host) Partition

Re: RedHat 7.4 Release Notes: "Btrfs has been deprecated" - wut?

2017-08-09 Thread Qu Wenruo
On 2017年08月07日 23:27, Chris Murphy wrote: On Fri, Aug 4, 2017 at 8:05 AM, Qu Wenruo wrote: For example, if one day there is some dm-csum to support verify csum of given ranges (and skip unrelated ones specified by higher levels), btrfs support for data csum is

Re: Btrfs umount hang

2017-08-09 Thread Angel Shtilianov
Hi Jeff, That's exactly what I am observing in the backtraces. umount reaches cache_block_group passing through btrfs_search_slot, which looks like got the wr_lock (to be confirmed tomorrow when I'm in the office) and all other btrfs worker threads are fighting for the btrfs_tree_read_lock. Umount

Re: [PATCH v3] Btrfs: fix out of bounds array access while reading extent buffer

2017-08-09 Thread Hugo Mills
On Wed, Aug 09, 2017 at 11:10:16AM -0600, Liu Bo wrote: > There is a cornel case that slip through the checkers in functions ^^ corner Sorry, that's been bugging me every time it goes past. A cornel is a kind of tree, apparently. Hugo. > reading extent buffer, ie. > > if

[PATCH v3] Btrfs: fix out of bounds array access while reading extent buffer

2017-08-09 Thread Liu Bo
There is a cornel case that slip through the checkers in functions reading extent buffer, ie. if (start < eb->len) and (start + len > eb->len), then a) map_private_extent_buffer() returns immediately because it's thinking the range spans across two pages, b) and the checkers in

Re: [PATCH v2] Btrfs: fix out of bounds array access while reading extent buffer

2017-08-09 Thread Liu Bo
On Wed, Aug 09, 2017 at 06:40:04PM +0100, Filipe Manana wrote: > On Wed, Aug 9, 2017 at 5:31 PM, Liu Bo wrote: > > There is a cornel case that slip through the checkers in functions > > reading extent buffer, ie. > > > > if (start < eb->len) and (start + len > eb->len), > >

Re: btrfs issue with mariadb incremental backup

2017-08-09 Thread Chris Murphy
On Wed, Aug 9, 2017 at 12:36 AM, wrote: > 488 btrfs sub snap mysql_201707230830 mysql > 489 systemctl start mariadb > 490 btrfs sub list . > 491 cat /var/log/mariadb/mariadb.log OK so mysql_201707230830 once on machine B is inconsistent somehow. So the

Re: [PATCH v2] Btrfs: fix out of bounds array access while reading extent buffer

2017-08-09 Thread Filipe Manana
On Wed, Aug 9, 2017 at 5:31 PM, Liu Bo wrote: > There is a cornel case that slip through the checkers in functions > reading extent buffer, ie. > > if (start < eb->len) and (start + len > eb->len), > then > > a) map_private_extent_buffer() returns immediately because > it's

Re: [PATCH v2] Btrfs: fix out of bounds array access while reading extent buffer

2017-08-09 Thread Filipe Manana
On Wed, Aug 9, 2017 at 5:31 PM, Liu Bo wrote: > There is a cornel case that slip through the checkers in functions > reading extent buffer, ie. > > if (start < eb->len) and (start + len > eb->len), > then > > a) map_private_extent_buffer() returns immediately because > it's

[PATCH v2] Btrfs: fix out of bounds array access while reading extent buffer

2017-08-09 Thread Liu Bo
There is a cornel case that slip through the checkers in functions reading extent buffer, ie. if (start < eb->len) and (start + len > eb->len), then a) map_private_extent_buffer() returns immediately because it's thinking the range spans across two pages, b) and the checkers in

Re: Btrfs umount hang

2017-08-09 Thread Jeff Mahoney
On 8/8/17 7:30 AM, Angel Shtilianov wrote: > crash> bt -f 31625 > PID: 31625 TASK: 88046a833400 CPU: 7 COMMAND: "btrfs-transacti" > wants to acquire struct extent_buffer 88000460aca0 lock, whose > lock_owner is 27574. > > here is pid 27574: > PID: 27574 TASK: 88038b469a00 CPU: 4

Re: [PATCH] Btrfs: fix out of bounds array access while reading extent buffer

2017-08-09 Thread Filipe Manana
On Tue, Aug 8, 2017 at 6:05 PM, Liu Bo wrote: > Hi Filipe, > > On Tue, Aug 08, 2017 at 09:47:21AM +0100, Filipe Manana wrote: >> On Mon, Aug 7, 2017 at 8:39 PM, Liu Bo wrote: >> > There is a cornel case that slip through the checkers in functions >> >

Re: BTRFS warning: unhandled fiemap cache detected

2017-08-09 Thread Mario Fugazzi®
Hi Janos, many thanks for your kind answer! Yes, I also saw a patch regarding this for 4.13, good to know that it is not a problem ;-) Thank you again. Mario On Wed, 9 Aug 2017 13:13:08 +0200 "Janos Toth F." wrote: > As much as I can tell it's nothing to worry about.

Re: BTRFS warning: unhandled fiemap cache detected

2017-08-09 Thread Janos Toth F.
As much as I can tell it's nothing to worry about. (I have thousands of these warnings.) I don't know why the patch was submitted for 4.13 but not applied to the next 4.12.x , since it looks like a trivial tiny fix for an annoying problem. On Wed, Aug 9, 2017 at 10:48 AM, Mario Fugazzi®

BTRFS warning: unhandled fiemap cache detected

2017-08-09 Thread Mario Fugazzi®
Hi everyone :-) After updating the kernel to the latest one 4.12 I receive a lot of warnings in my dmesg but only on my ssd that is a kingston hyperx predator. No message get logged for my other two traditional HD that are btrfs also. Warnings show only on boot and not on every boot. Kernel is

Re: btrfs issue with mariadb incremental backup

2017-08-09 Thread siranee . ja
Hi Chris, Sorry for the incompleted command that I used in the post. This is the real command from Machine A backup step : in crontab 30 08 * * * root /root/script/backup/backupsnap.sh root password /var/lib/mariadb/mysql [root@backuplogC7 ~]# cat /root/script/backup/backupsnap.sh #Backup #