Re: Btrfs/SSD

2017-04-17 Thread Roman Mamedov
On Tue, 18 Apr 2017 03:23:13 + (UTC) Duncan <1i5t5.dun...@cox.net> wrote: > Without reading the links... > > Are you /sure/ it's /all/ ssds currently on the market? Or are you > thinking narrowly, those actually sold as ssds? > > Because all I've read (and I admit I may not actually be cur

Re: compressing nocow files

2017-04-17 Thread Chris Murphy
To inhibit chattr +C on systemd-journald journals: - manually remove the attribute on /var/log/journal and /var/log/journal/ - write an empty file: /etc/tmpfiles.d/journal-nocow.conf Chris Murphy -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message

Re: compressing nocow files

2017-04-17 Thread Duncan
Liu Bo posted on Mon, 17 Apr 2017 11:07:07 -0700 as excerpted: > On Mon, Apr 17, 2017 at 11:36:17AM -0600, Chris Murphy wrote: >> HI, >> >> >> /dev/nvme0n1p8 on / type btrfs >> (rw,relatime,seclabel,ssd,space_cache,subvolid=258,subvol=/root) >> >> I've got a test folder with +C set and then cop

Re: [PATCH] Btrfs: fix extent map leak during fallocate error path

2017-04-17 Thread Liu Bo
On Tue, Apr 04, 2017 at 03:20:36AM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > If the call to btrfs_qgroup_reserve_data() failed, we were leaking an > extent map structure. The failure can happen either due to an -ENOMEM > condition or, when quotas are enabled, due to -EDQUOT for

Re: Btrfs/SSD

2017-04-17 Thread Duncan
Roman Mamedov posted on Mon, 17 Apr 2017 23:24:19 +0500 as excerpted: > Days are long gone since the end user had to ever think about device > lifetimes with SSDs. Refer to endurance studies such as > http://techreport.com/review/27909/the-ssd-endurance-experiment-theyre- all-dead > http://ssdendu

[PATCH 3/6] Btrfs: change how we iterate bios in endio

2017-04-17 Thread Liu Bo
Since dio submit has used bio_clone_fast, the submitted bio may not have a reliable bi_vcnt, for the bio vector iterations in checksum related functions, bio->bi_iter is not modified yet and it's safe to use bio_for_each_segment, while for those bio vector iterations in dio's read endio, we now sav

[PATCH 0/6 RFC] utilize bio_clone_fast to clean up

2017-04-17 Thread Liu Bo
This attempts to use bio_clone_fast() in the places where we clone bio, such as when bio got cloned for multiple disks and when bio got split during dio submit. One benefit is to simplify dio submit to avoid calling bio_add_page one by one. Another benefit is that comparing to bio_clone_bioset, b

[PATCH 5/6] Btrfs: change check-integrity to use bvec_iter

2017-04-17 Thread Liu Bo
Some check-integrity code depends on bio->bi_vcnt, this changes it to use bio segments because some bios passing here may not have a reliable bi_vcnt. Signed-off-by: Liu Bo --- fs/btrfs/check-integrity.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --

[PATCH 4/6] Btrfs: record error if one block has failed to retry

2017-04-17 Thread Liu Bo
In the nocsum case of dio read endio, it will return immediately if an error got returned when repairing, which left the rest blocks unrepaired. The behavior is different from how buffered read endio works in the same case. This changes it to record error only and go on repairing the rest blocks.

[PATCH 6/6] Btrfs: unify naming of btrfs_io_bio

2017-04-17 Thread Liu Bo
All dio endio functions are using io_bio for struct btrfs_io_bio, this makes btrfs_submit_direct to follow this convention. Signed-off-by: Liu Bo --- fs/btrfs/inode.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/fs/btrfs/inode.c b/f

[PATCH 1/6] Btrfs: use bio_clone_fast to clone our bio

2017-04-17 Thread Liu Bo
For raid1 and raid10, we clone the original bio to the bios which are then sent to different disks. Signed-off-by: Liu Bo --- fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 27fdb25..0d4aea4 100644 --- a/f

[PATCH 2/6] Btrfs: use bio_clone_bioset_partial to simplify DIO submit

2017-04-17 Thread Liu Bo
Currently when mapping bio to limit bio to a single stripe length, we split bio by adding page to bio one by one, but later we don't modify the vector of bio at all, thus we can use bio_clone_fast to use the original bio vector directly. Signed-off-by: Liu Bo --- fs/btrfs/extent_io.c | 15 +

Re: Btrfs/SSD

2017-04-17 Thread Hans van Kranenburg
On 04/17/2017 09:22 PM, Imran Geriskovan wrote: > [...] > > Going over the thread following questions come to my mind: > > - What exactly does btrfs ssd option does relative to plain mode? There's quite an amount of information in the the very recent threads: - "About free space fragmentation, m

Re: Btrfs/SSD

2017-04-17 Thread Chris Murphy
On Mon, Apr 17, 2017 at 1:26 PM, Austin S. Hemmelgarn wrote: > On 2017-04-17 14:34, Chris Murphy wrote: >> Nope. The first paragraph applies to NVMe machine with ssd mount >> option. Few fragments. >> >> The second paragraph applies to SD Card machine with ssd_spread mount >> option. Many fragmen

Re: Btrfs/SSD

2017-04-17 Thread Austin S. Hemmelgarn
On 2017-04-17 14:34, Chris Murphy wrote: On Mon, Apr 17, 2017 at 11:13 AM, Austin S. Hemmelgarn wrote: What is a high end SSD these days? Built-in NVMe? One with a good FTL in the firmware. At minimum, the good Samsung EVO drives, the high quality Intel ones, and the Crucial MX series, but

Re: Btrfs/SSD

2017-04-17 Thread Imran Geriskovan
On 4/17/17, Roman Mamedov wrote: > "Austin S. Hemmelgarn" wrote: >> * Compression should help performance and device lifetime most of the >> time, unless your CPU is fully utilized on a regular basis (in which >> case it will hurt performance, but still improve device lifetimes). > Days are lon

Re: Btrfs/SSD

2017-04-17 Thread Chris Murphy
On Mon, Apr 17, 2017 at 11:13 AM, Austin S. Hemmelgarn wrote: >> What is a high end SSD these days? Built-in NVMe? > > One with a good FTL in the firmware. At minimum, the good Samsung EVO > drives, the high quality Intel ones, and the Crucial MX series, but probably > some others. My choice of

Re: Btrfs/SSD

2017-04-17 Thread Roman Mamedov
On Mon, 17 Apr 2017 07:53:04 -0400 "Austin S. Hemmelgarn" wrote: > General info (not BTRFS specific): > * Based on SMART attributes and other factors, current life expectancy > for light usage (normal desktop usage) appears to be somewhere around > 8-12 years depending on specifics of usage (as

Re: Remounting read-write after error is not allowed

2017-04-17 Thread Liu Bo
On Mon, Apr 17, 2017 at 02:00:45PM -0400, Alexandru Guzu wrote: > Not sure if anyone is looking into that segfault, but I have an update. > I disconnected the USB drive for a while and today I reconnected it > and it auto-mounted with no issue. > > What is interesting is that the drive letter chan

Re: compressing nocow files

2017-04-17 Thread Chris Murphy
On Mon, Apr 17, 2017 at 12:07 PM, Liu Bo wrote: > On Mon, Apr 17, 2017 at 11:36:17AM -0600, Chris Murphy wrote: >> HI, >> >> >> /dev/nvme0n1p8 on / type btrfs >> (rw,relatime,seclabel,ssd,space_cache,subvolid=258,subvol=/root) >> >> I've got a test folder with +C set and then copied a test file in

Re: compressing nocow files

2017-04-17 Thread Liu Bo
On Mon, Apr 17, 2017 at 11:36:17AM -0600, Chris Murphy wrote: > HI, > > > /dev/nvme0n1p8 on / type btrfs > (rw,relatime,seclabel,ssd,space_cache,subvolid=258,subvol=/root) > > I've got a test folder with +C set and then copied a test file into it. > > $ lsattr > C-- > ./system@2

Re: compressing nocow files

2017-04-17 Thread Austin S. Hemmelgarn
On 2017-04-17 13:36, Chris Murphy wrote: HI, /dev/nvme0n1p8 on / type btrfs (rw,relatime,seclabel,ssd,space_cache,subvolid=258,subvol=/root) I've got a test folder with +C set and then copied a test file into it. $ lsattr C-- ./system@2547b430ecdc441c9cf82569eeb22065-0

Re: compressing nocow files

2017-04-17 Thread Austin S. Hemmelgarn
On 2017-04-17 13:36, Chris Murphy wrote: HI, /dev/nvme0n1p8 on / type btrfs (rw,relatime,seclabel,ssd,space_cache,subvolid=258,subvol=/root) I've got a test folder with +C set and then copied a test file into it. $ lsattr C-- ./system@2547b430ecdc441c9cf82569eeb22065-0

Re: Remounting read-write after error is not allowed

2017-04-17 Thread Alexandru Guzu
Not sure if anyone is looking into that segfault, but I have an update. I disconnected the USB drive for a while and today I reconnected it and it auto-mounted with no issue. What is interesting is that the drive letter changed to what is was before when it was working. Remember that in my first e

compressing nocow files

2017-04-17 Thread Chris Murphy
HI, /dev/nvme0n1p8 on / type btrfs (rw,relatime,seclabel,ssd,space_cache,subvolid=258,subvol=/root) I've got a test folder with +C set and then copied a test file into it. $ lsattr C-- ./system@2547b430ecdc441c9cf82569eeb22065-0001-00054c3c31bec567.journal So now it

Re: Btrfs/SSD

2017-04-17 Thread Austin S. Hemmelgarn
On 2017-04-17 12:58, Chris Murphy wrote: On Mon, Apr 17, 2017 at 5:53 AM, Austin S. Hemmelgarn wrote: Regarding BTRFS specifically: * Given my recently newfound understanding of what the 'ssd' mount option actually does, I'm inclined to recommend that people who are using high-end SSD's _NOT_

Re: Btrfs/SSD

2017-04-17 Thread Chris Murphy
On Mon, Apr 17, 2017 at 5:53 AM, Austin S. Hemmelgarn wrote: > Regarding BTRFS specifically: > * Given my recently newfound understanding of what the 'ssd' mount option > actually does, I'm inclined to recommend that people who are using high-end > SSD's _NOT_ use it as it will heavily increase f

Re: Btrfs/SSD

2017-04-17 Thread Austin S. Hemmelgarn
On 2017-04-14 07:02, Imran Geriskovan wrote: Hi, Sometime ago we had some discussion about SSDs. Within the limits of unknown/undocumented device infos, we loosely had covered data retension capability/disk age/life time interrelations, (in?)effectiveness of btrfs dup on SSDs, etc.. Now, as time