Re: Transaction aborted in btrfs_rename2

2016-07-29 Thread Adam Borowski
On Fri, Jul 29, 2016 at 11:43:29AM -0400, Jeff Mahoney wrote: > On 6/6/16 10:13 AM, Jeff Mahoney wrote: > > On 6/6/16 7:47 AM, Adam Borowski wrote: > >> Hi! > >> I just got this thrice, in 4.7-rc1 and 4.7-rc2: > >> > >> [ 1836.672368] --

Re: Extents for a particular subvolume

2016-08-03 Thread Adam Borowski
On Wed, Aug 03, 2016 at 08:56:01PM +0100, Graham Cobb wrote: > Are there any btrfs commands (or APIs) to allow a script to create a > list of all the extents referred to within a particular (mounted) > subvolume? And is it a reasonably efficient process (i.e. doesn't > involve backrefs and, prefer

Re: checksum error in metadata node - best way to move root fs to new drive?

2016-08-12 Thread Adam Borowski
On Thu, Aug 11, 2016 at 04:23:45PM -0400, Dave T wrote: > 1. Can one discontinue using the compress mount option if it has been > used previously? The mount option applies only to newly written blocks, and even then only to files that don't say otherwise (via chattr +c or +C, btrfs property, etc).

Re: does btrfs-receive use/compare the checksums from the btrfs-send side?

2016-08-28 Thread Adam Borowski
On Sun, Aug 28, 2016 at 07:50:42PM +0200, Christoph Anton Mitterer wrote: > On Sun, 2016-08-28 at 11:35 -0600, Chris Murphy wrote: > > I don't see evidence of them in the btrfs send file, so I don't think > > csums are in the stream. > > hmm... isn't that kinda unfortunate not to make use of the i

Re: compress=lzo safe to use? (was: Re: Trying to rescue my data :()

2016-09-11 Thread Adam Borowski
On Sun, Sep 11, 2016 at 09:48:35PM +0200, Martin Steigerwald wrote: > Hmm… I found this from being referred to by reading Debian wiki page on > BTRFS¹. > > I use compress=lzo on BTRFS RAID 1 since April 2014 and I never found an > issue. Steven, your filesystem wasn´t RAID 1 but RAID 5 or 6? >

Re: Size of scrubbed Data

2016-09-17 Thread Adam Borowski
On Sat, Sep 17, 2016 at 01:02:18PM +0200, Stefan Malte Schumacher wrote: > Concerning Testing: I only use it on desktops and home servers, which > do not offer any services to the net. I am very fond of Debian and > always use stable or even old-stable on work servers, but was finally > to annoyed

splat in split_leaf with integrity checking

2016-09-19 Thread Adam Borowski
Hi! I just had the following splat in 4.8-rc6 for the third time in a week: [413782.442899] BTRFS critical (device sda1): corrupt leaf, non-root leaf's nritems is 0: block=692012023808,root=1, slot=0 [413782.453888] BTRFS info (device sda1): leaf 692012023808 total ptrs 0 free space 16283 [41378

Re: splat in split_leaf with integrity checking

2016-09-20 Thread Adam Borowski
On Mon, Sep 19, 2016 at 07:21:47PM -0700, Liu Bo wrote: > On Tue, Sep 20, 2016 at 03:39:27AM +0200, Adam Borowski wrote: > > Hi! > > I just had the following splat in 4.8-rc6 for the third time in a week: > > Sorry for the trouble, this is caused by my patch and here are two

[PATCH] btrfs-progs: docs: document exit codes from scrub

2016-09-23 Thread Adam Borowski
Signed-off-by: Adam Borowski --- Documentation/btrfs-scrub.asciidoc | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/btrfs-scrub.asciidoc b/Documentation/btrfs-scrub.asciidoc index 40e793c..e88e684 100644 --- a/Documentation/btrfs-scrub.asciidoc +++ b

Re: Does data checksumming remain for files with No_COW file attribute?

2016-09-24 Thread Adam Borowski
On Sat, Sep 24, 2016 at 08:09:26PM +0200, Christoph Anton Mitterer wrote: > On Sat, 2016-09-24 at 17:40 +0500, Roman Mamedov wrote: > > Yes. IIRC the reasoning was that it's more difficult to track checksums > > of data which is being overwritten in-place (as opposed to CoW). > AFAIU it wouldn't be

Re: Does data checksumming remain for files with No_COW file attribute?

2016-09-24 Thread Adam Borowski
On Sun, Sep 25, 2016 at 02:25:32AM +0300, Alexander Tomokhov wrote: > Ok, so data checksumming does not remain for newly created empty files > with No_COW attribute. I think it's an important trait of Btrfs behavior > and should be added to wiki. So that users are informed that disabling > CoW on

Re: Does data checksumming remain for files with No_COW file attribute?

2016-09-26 Thread Adam Borowski
On Sun, Sep 25, 2016 at 05:44:30AM +, Duncan wrote: > Adam Borowski posted on Sun, 25 Sep 2016 01:50:14 +0200 as excerpted: > > Actually, it disables pretty much all btrfs features except for... CoW. > > > > You lose: > > * checksums > > * compression >

Re: BTRFS: space_info 4 has 18446742286429913088 free, is not full

2016-09-29 Thread Adam Borowski
On Thu, Sep 29, 2016 at 09:27:01AM +0200, Stefan Priebe - Profihost AG wrote: > Am 29.09.2016 um 09:13 schrieb Wang Xiaoguang: > >>> I found that compress sometime report ENOSPC error even in 4.8-rc8, > >>> currently > >> I cannot confirm that as i do not have anough space to test this without > >>

Re: RAID system with adaption to changed number of disks

2016-10-12 Thread Adam Borowski
On Wed, Oct 12, 2016 at 01:19:37PM -0400, Zygo Blaxell wrote: > On Wed, Oct 12, 2016 at 01:48:58PM +0800, Qu Wenruo wrote: > > In fact, the _concept_ to solve such RMW behavior is quite simple: > > > > Make sector size equal to stripe length. (Or vice versa if you like) > > > > Although the imple

Re: RAID system with adaption to changed number of disks

2016-10-12 Thread Adam Borowski
On Wed, Oct 12, 2016 at 05:10:18PM -0400, Zygo Blaxell wrote: > On Wed, Oct 12, 2016 at 09:55:28PM +0200, Adam Borowski wrote: > > On Wed, Oct 12, 2016 at 01:19:37PM -0400, Zygo Blaxell wrote: > > > I had been thinking that we could inject "plug" extents to fill up &

[PATCH RESEND 1/2] btrfs-progs: fix kernel version parsing on some versions past 3.0

2018-11-21 Thread Adam Borowski
The code fails if the third section is missing (like "4.18") or is followed by anything but "." or "-". This happens for example if we're not exactly at a tag and CONFIG_LOCALVERSION_AUTO=n (which results in "4.18.5+"). Signed-off-by: Adam Borowski -

[PATCH RESEND-v3 2/2] btrfs-progs: defrag: open files RO on new enough kernels

2018-11-21 Thread Adam Borowski
616d374efa23). Signed-off-by: Adam Borowski --- v2: more eloquent description; root can't defrag RO on old kernels (unlike dedupe) v3: more eloquentier description; s/defrag_ro/defrag_open_mode/ cmds-filesystem.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a

Re: [PATCH 7/9] btrfs-progs: Fix Wmaybe-uninitialized warning

2018-12-04 Thread Adam Borowski
On Tue, Dec 04, 2018 at 01:17:04PM +0100, David Sterba wrote: > On Fri, Nov 16, 2018 at 03:54:24PM +0800, Qu Wenruo wrote: > > The only location is the following code: > > > > int level = path->lowest_level + 1; > > BUG_ON(path->lowest_level + 1 >= BTRFS_MAX_LEVEL); > > while(level < B

Re: [PATCH 00/10] btrfs: Support for DAX devices

2018-12-05 Thread Adam Borowski
On Wed, Dec 05, 2018 at 06:28:25AM -0600, Goldwyn Rodrigues wrote: > This is a support for DAX in btrfs. Yay! > I understand there have been previous attempts at it. However, I wanted > to make sure copy-on-write (COW) works on dax as well. btrfs' usual use of CoW and DAX are thoroughly in conf

Re: [PATCH 01/10] btrfs: create a mount option for dax

2018-12-05 Thread Adam Borowski
On Wed, Dec 05, 2018 at 02:43:03PM +0200, Nikolay Borisov wrote: > One question below though . > > > +++ b/fs/btrfs/super.c > > @@ -739,6 +741,17 @@ int btrfs_parse_options(struct btrfs_fs_info *info, > > char *options, > > case Opt_user_subvol_rm_allowed: > > btrf

Re: SATA/SAS mixed pool

2018-12-12 Thread Adam Borowski
On Wed, Dec 12, 2018 at 09:31:02PM -0600, Nathan Dehnel wrote: > Is it possible/safe to replace a SATA drive in a btrfs RAID10 pool > with an SAS drive? For btrfs, a block device is a block device, it's not "racist". You can freely mix and/or replace. If you want to, say, extend a SD card with NB

Re: SATA/SAS mixed pool

2018-12-14 Thread Adam Borowski
On Fri, Dec 14, 2018 at 05:14:37AM +, Duncan wrote: > Adam Borowski posted on Thu, 13 Dec 2018 08:29:05 +0100 as excerpted: > > On Wed, Dec 12, 2018 at 09:31:02PM -0600, Nathan Dehnel wrote: > >> Is it possible/safe to replace a SATA drive in a btrfs RAID10 pool with

Re: compress-force not really forcing compression?

2018-12-22 Thread Adam Borowski
On Sun, Dec 23, 2018 at 12:24:02AM +, Paul Jones wrote: > > IMHO the more pertinent question is : > > > > If a file has portions which are not easily compressible does that imply all > > future writes are also incompressible. IMO no, so I think what will be > > prudent > > is remove FORCE_COM

Re: RAID56 Warning on "multiple serious data-loss bugs"

2019-01-28 Thread Adam Borowski
On Mon, Jan 28, 2019 at 03:23:28PM +, Supercilious Dude wrote: > On Mon, 28 Jan 2019 at 01:18, Qu Wenruo wrote: > > > > So for current upstream kernel, there should be no major problem despite > > write hole. > > > Can you please elaborate on the implications of the write-hole? Does > it mea

Re: [RFC PATCH 0/6] Allow setting file birth time with utimensat()

2019-02-17 Thread Adam Borowski
On Sun, Feb 17, 2019 at 06:35:25PM +0200, Boaz Harrosh wrote: > On 15/02/19 00:06, Dave Chinner wrote: > > So you're adding an interface that allows users to change the create > > time of files without needing any privileges? > > Inode create time is forensic metadata in XFS - information we use

[PATCH] btrfs-progs: fix a printf format string fatal warning

2019-07-13 Thread Adam Borowski
At least in Debian, default build flags include -Werror=format-security, for good reasons in most cases. Here, the string comes from strftime -- and though I don't suspect any locale would be crazy enough to have %X include a '%' char, the compiler has no way to know that. Sign

[PATCH] btrfs-progs: check: fix option parsing for -E

2019-07-27 Thread Adam Borowski
> On Mon, Jun 17, 2019 at 06:45:48PM +0200, Adam Borowski wrote: > > It has a mandatory argument, thus it always crashed. > > Applied, thanks. Seems like this has fallen through the cracks -- could you please re-apply? --8x--8x--8x--8x--8x--8x--8x--8x--8x--8x--8x--8x--8x--8x--8x-

Re: btrfs on RHEL7 (kernel 3.10.0) production ready?

2019-08-03 Thread Adam Borowski
On Sat, Aug 03, 2019 at 12:09:28PM +0200, Ulli Horlacher wrote: > I have RHEL 7 and CentOS 7.6 servers with kernel 3.10.0 and btrfs-progs v4.9.1 > Is btrfs there ready for production usage(*)? Hell no! It's a truly ancient kernel, from the times btrfs wasn't considered stable. There's a lot of ba

Re: [PATCH v2 0/4] Support xxhash64 checksums

2019-08-23 Thread Adam Borowski
On Fri, Aug 23, 2019 at 09:43:22AM +, Paul Jones wrote: > > > Am Do., 22. Aug. 2019 um 16:41 Uhr schrieb Holger Hoffstätte > > > : > > > > but how does btrfs benefit from this compared to using crc32-intel? > > > > > > As i know, crc32c is as far as ~3x faster than xxhash. But xxHash was > > >

Re: [PATCH v2 0/4] Support xxhash64 checksums

2019-08-26 Thread Adam Borowski
On Mon, Aug 26, 2019 at 08:27:15AM -0400, Austin S. Hemmelgarn wrote: > On 2019-08-23 13:08, Adam Borowski wrote: > > the improved collision > > resistance of xxhash64 is not a reason as if you intend to dedupe you want > > a crypto hash so you don't need to verify. &

docbook45 is gone

2019-09-03 Thread Adam Borowski
Hi! I'm afraid that asciidoctor 2.0 dropped support for docbook45. The explanation given is here: https://github.com/asciidoctor/asciidoctor/issues/3005 This makes btrfs-progs fail to build unless docs are off, with: asciidoctor: FAILED: missing converter for backend 'docbook45'. Processing abor

Re: [PATCH v4 08/12] btrfs-progs: add option for checksum type to mkfs

2019-09-24 Thread Adam Borowski
On Tue, Sep 24, 2019 at 04:26:53PM +0200, David Sterba wrote: > On Tue, Sep 03, 2019 at 05:00:42PM +0200, Johannes Thumshirn wrote: > > Add an option to mkfs to specify which checksum algorithm will be used for > > the filesystem. > > > > Signed-off-by: Johannes Thumshirn > > I'll change the opt

Re: btrfs-cleaner / snapshot performance analysis

2018-02-11 Thread Adam Borowski
On Sun, Feb 11, 2018 at 12:31:42PM +0300, Andrei Borzenkov wrote: > 11.02.2018 04:02, Hans van Kranenburg пишет: > >> - /dev/sda6 / btrfs > >> rw,relatime,ssd,space_cache,subvolid=259,subvol=/@/.snapshots/1/snapshot > >> 0 0 > > > > Note that changes on atime cause writes to metadata, which means

Re: Metadata / Data on Heterogeneous Media

2018-02-15 Thread Adam Borowski
On Thu, Feb 15, 2018 at 12:15:49PM -0500, Ellis H. Wilson III wrote: > In discussing the performance of various metadata operations over the past > few days I've had this idea in the back of my head, and wanted to see if > anybody had already thought about it before (likely, I would guess). > > It

Re: zerofree btrfs support?

2018-03-10 Thread Adam Borowski
On Sat, Mar 10, 2018 at 03:55:25AM +0100, Christoph Anton Mitterer wrote: > Just wondered... was it ever planned (or is there some equivalent) to > get support for btrfs in zerofree? Do you want zerofree for thin storage optimization, or for security? For the former, you can use fstrim; this is e

Re: zerofree btrfs support?

2018-03-10 Thread Adam Borowski
On Sat, Mar 10, 2018 at 07:37:22PM +0500, Roman Mamedov wrote: > Note you can use it on HDDs too, even without QEMU and the like: via using LVM > "thin" volumes. I use that on a number of machines, the benefit is that since > TRIMed areas are "stored nowhere", those partitions allow for incredibly

Re: Raid1 volume stuck as read-only: How to dump, recreate and restore its content?

2018-03-11 Thread Adam Borowski
On Sun, Mar 11, 2018 at 11:28:08PM +0700, Andreas Hild wrote: > Following a physical disk failure of a RAID1 array, I tried to mount > the remaining volume of a root partition with "-o degraded". For some > reason it ended up as read-only as described here: > https://btrfs.wiki.kernel.org/index.php

Re: Question, will ls -l eventually be able to show subvolumes?

2018-03-30 Thread Adam Borowski
On Fri, Mar 30, 2018 at 10:42:10AM +0100, Pete wrote: > I've just notice work going on to make rmdir be able to delete > subvolumes. Is there an intent to allow ls -l to display directories as > subvolumes? That's entirely up to coreutils guys. Meow! -- ᛊᚨᚾᛁᛏᚣ᛫ᛁᛊ᛫ᚠᛟᚱ᛫ᚦᛖ᛫ᚹᛖᚨᚲ -- To unsubscribe

Re: [wiki] Please clarify how to check whether barriers are properly implemented in hardware

2018-04-02 Thread Adam Borowski
On Mon, Apr 02, 2018 at 10:07:01PM +, Hugo Mills wrote: > On Mon, Apr 02, 2018 at 06:03:00PM -0400, Fedja Beader wrote: > > Is there some testing utility for this? Is there a way to extract this/tell > > with a high enough certainty from datasheets/other material before purchase? > >Given

Re: [PATCH 2/2] btrfs: add balance args info during start and resume

2018-04-26 Thread Adam Borowski
On Thu, Apr 26, 2018 at 04:01:29PM +0800, Anand Jain wrote: > Balance args info is an important information to be reviewed on the > system under audit. So this patch adds that. This kept annoying me. Thanks a lot! -- ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢰⠒⠀⣿⡁ ⢿⡄⠘⠷⠚⠋⠀ Certified airhead; got the CT scan to prove that! ⠈⠳

Re: exclusive subvolume space missing

2017-12-03 Thread Adam Borowski
On Sun, Dec 03, 2017 at 01:45:45AM +, Duncan wrote: > Tomasz Pala posted on Sat, 02 Dec 2017 18:18:19 +0100 as excerpted: > >> I got ~500 small files (100-500 kB) updated partially in regular > >> intervals: > >> > >> # du -Lc **/*.rrd | tail -n1 > >> 105Mtotal > > FWIW, I've no idea what

[PATCH] fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at

2017-12-12 Thread Adam Borowski
This link is replicated in most filesystems' config stanzas. Referring to an archived version of that site is pointless as it mostly deals with patches; user documentation is available elsewhere. Signed-off-by: Adam Borowski --- Sending this as one piece; if you guys would instead prefer

Re: Unexpected raid1 behaviour

2017-12-19 Thread Adam Borowski
On Mon, Dec 18, 2017 at 03:28:14PM -0700, Chris Murphy wrote: > On Mon, Dec 18, 2017 at 1:49 AM, Anand Jain wrote: > > Agreed. IMO degraded-raid1-single-chunk is an accidental feature > > caused by [1], which we should revert back, since.. > >- balance (to raid1 chunk) may fail if FS is near

hang in btrfs_async_reclaim_metadata_space

2018-01-05 Thread Adam Borowski
Hi! I got a reproducible infinite hang, reliably triggered by the testsuite of "flatpak"; fails on at least 4.15-rc6, 4.9.75, and on another machine with Debian's 4.14.2-1. [580632.355107] INFO: task kworker/u8:2:11105 blocked for more than 120 seconds. [580632.355120] Not tainted 4.14.0-1-a

Re: hang in btrfs_async_reclaim_metadata_space

2018-01-10 Thread Adam Borowski
On Sun, Jan 07, 2018 at 01:17:19PM +0200, Nikolay Borisov wrote: > On 6.01.2018 07:10, Adam Borowski wrote: > > Hi! > > I got a reproducible infinite hang, reliably triggered by the testsuite of > > "flatpak"; fails on at least 4.15-rc6, 4.9.75, and on another mac

Re: degraded permanent mount option

2018-01-27 Thread Adam Borowski
On Sat, Jan 27, 2018 at 12:06:19PM +0100, Tomasz Pala wrote: > On Sat, Jan 27, 2018 at 13:26:13 +0300, Andrei Borzenkov wrote: > > >> I just tested to boot with a single drive (raid1 degraded), even with > >> degraded option in fstab and grub, unable to boot ! The boot process > >> stop on initra

Re: degraded permanent mount option

2018-01-27 Thread Adam Borowski
On Sat, Jan 27, 2018 at 03:36:48PM +0100, Goffredo Baroncelli wrote: > I think that the real problem relies that the mounting a btrfs filesystem > cannot be a responsibility of systemd (or whichever rc-system). > Unfortunately in the past it was thought that it would be sufficient to > assemble a

Re: degraded permanent mount option

2018-01-29 Thread Adam Borowski
On Mon, Jan 29, 2018 at 09:54:04AM +0100, Tomasz Pala wrote: > On Sun, Jan 28, 2018 at 17:00:46 -0700, Chris Murphy wrote: > > > systemd can't possibly need to know more information than a person > > does in the exact same situation in order to do the right thing. No > > human would wait 10 minute

[PATCH] btrfs-progs: fix unterminated long opts for send

2020-12-25 Thread Adam Borowski
Any use of a long option would crash. Signed-off-by: Adam Borowski --- cmds/send.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmds/send.c b/cmds/send.c index b8e3ba12..3bfc69f5 100644 --- a/cmds/send.c +++ b/cmds/send.c @@ -496,7 +496,8 @@ static int cmd_send(const

[PATCH] btrfs-progs: a bunch of typo fixes

2020-12-25 Thread Adam Borowski
Signed-off-by: Adam Borowski --- CHANGES | 2 +- Documentation/btrfs-balance.asciidoc | 2 +- Documentation/btrfs-man5.asciidoc| 4 ++-- INSTALL | 2 +- README.md| 2 +- cmds/filesystem-usage.c

Re: Why do we need these mount options?

2021-01-16 Thread Adam Borowski
On Sat, Jan 16, 2021 at 10:39:51AM +0300, Andrei Borzenkov wrote: > 15.01.2021 06:54, Zygo Blaxell пишет: > > On the other hand, I'm in favor of deprecating the whole discard option > > and going with fstrim instead. discard in its current form tends to > > increase write wear rather than decrease

[PATCH resend 0/2] btrfs: fix races between exec and defrag

2018-07-17 Thread Adam Borowski
die("read(%lu): %m\n", off); if (lseek(fd, off, SEEK_SET) != off) die("lseek for write: %m\n"); if (write(fd, &b, 1) != 1) die("write: %m\n"); } return 0; } >From d040af09adb03daadbba4336700f40425a860320 Mon S

[PATCH resend 1/2] btrfs: allow defrag on a file opened ro that has rw permissions

2018-07-17 Thread Adam Borowski
's no reason to consider it a rw operation. Thus, let's check only whether the file could have been opened rw. Such access control is still needed as currently defrag can use extra disk space, and might trigger bugs. Signed-off-by: Adam Borowski --- fs/btrfs/ioctl.c | 3 ++- 1 file ch

[PATCH resend 2/2] btrfs: defrag: return EPERM not EINVAL when only permissions fail

2018-07-17 Thread Adam Borowski
eyond strerror(). Signed-off-by: Adam Borowski --- fs/btrfs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 01c150b6ab62..e96e3c3caca1 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2943,7 +2943,7 @@ stati

Re: [PATCH resend 1/2] btrfs: allow defrag on a file opened ro that has rw permissions

2018-07-24 Thread Adam Borowski
On Mon, Jul 23, 2018 at 05:26:24PM +0200, David Sterba wrote: > On Wed, Jul 18, 2018 at 12:08:59AM +0200, Adam Borowski wrote: (Combined with as-folded) | | btrfs: allow defrag on a file opened read-only that has rw permissions | | > > Requiring a rw descriptor conflicts both ways

Re: BTRFS and databases

2018-08-01 Thread Adam Borowski
On Wed, Aug 01, 2018 at 05:45:15AM +0200, MegaBrutal wrote: > But there is still one question that I can't get over: if you store a > database (e.g. MySQL), would you prefer having a BTRFS volume mounted > with nodatacow, or would you just simply use ext4? > > I know that with nodatacow, I take aw

Re: [RESEND][PATCH v5 0/2] vfs: better dedupe permission check

2018-08-07 Thread Adam Borowski
duped gets ETXTBUSY. The answer (as above) is to allow them to > open the targets ro - root can already do this. There was a patch from > Adam Borowski to fix this back in 2016 > The 2nd patch fixes our return code for permission denied to be > EPERM. For some reason we're returning

Re: lazytime mount option—no support in Btrfs

2018-08-21 Thread Adam Borowski
On Mon, Aug 20, 2018 at 08:16:16AM -0400, Austin S. Hemmelgarn wrote: > Also, slightly OT, but atimes are not where the real benefit is here for > most people. No sane software other than mutt uses atimes (and mutt's use > of them is not sane, but that's a different argument) Right. There are tw

[PATCH 1/2] btrfs-progs: fix kernel version parsing on some versions past 3.0

2018-09-03 Thread Adam Borowski
The code fails if the third section is missing (like "4.18") or is followed by anything but "." or "-". This happens for example if we're not exactly at a tag and CONFIG_LOCALVERSION_AUTO=n (which results in "4.18.5+"). Signed-off-by: Adam Borowski -

[PATCH 2/2] btrfs-progs: defrag: open files RO on new enough kernels or if root

2018-09-03 Thread Adam Borowski
Fixes EXTXBSY races. Signed-off-by: Adam Borowski --- cmds-filesystem.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmds-filesystem.c b/cmds-filesystem.c index 06c8311b..4c9df69f 100644 --- a/cmds-filesystem.c +++ b/cmds-filesystem.c @@ -26,6 +26,7

Re: IO errors when building RAID1.... ?

2018-09-03 Thread Adam Borowski
On Sun, Sep 02, 2018 at 09:15:25PM -0600, Chris Murphy wrote: > For > 10 years drive firmware handles bad sector remapping internally. > It remaps the sector logical address to a reserve physical sector. > > NTFS and ext[234] have a means of accepting a list of bad sectors, and > will avoid using

Re: [PATCH 2/2] btrfs-progs: defrag: open files RO on new enough kernels or if root

2018-09-03 Thread Adam Borowski
On Mon, Sep 03, 2018 at 02:01:21PM +0300, Nikolay Borisov wrote: > On 3.09.2018 13:14, Adam Borowski wrote: > > Fixes EXTXBSY races. > > You have to be more eloquent than that and explain at least one race > condition. If you try to defrag an executable that's currently

Re: [PATCH 2/2] btrfs-progs: defrag: open files RO on new enough kernels or if root

2018-09-03 Thread Adam Borowski
On Mon, Sep 03, 2018 at 02:04:23PM +0300, Nikolay Borisov wrote: > On 3.09.2018 13:14, Adam Borowski wrote: > > - fd = open(fpath, O_RDWR); > > + fd = open(fpath, defrag_ro); > > Looking at the kernel code I think this is in fact incorrect, because

[PATCH v2] btrfs-progs: defrag: open files RO on new enough kernels

2018-09-03 Thread Adam Borowski
: Adam Borowski --- v2: more eloquent description; root can't defrag RO on old kernels (unlike dedupe) cmds-filesystem.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmds-filesystem.c b/cmds-filesystem.c index 06c8311b..17e992a3 100644 --- a/cmds-filesys

[PATCH v3] btrfs-progs: defrag: open files RO on new enough kernels

2018-09-03 Thread Adam Borowski
616d374efa23). Signed-off-by: Adam Borowski --- v2: more eloquent description; root can't defrag RO on old kernels (unlike dedupe) v3: more eloquentier description; s/defrag_ro/defrag_open_mode/ cmds-filesystem.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a

Re: dduper - Offline btrfs deduplication tool

2018-09-07 Thread Adam Borowski
On Fri, Sep 07, 2018 at 09:27:28AM +0530, Lakshmipathi.G wrote: > > One question: > > Why not ioctl_fideduperange? > > i.e. you kill most of benefits from that ioctl - atomicity. > > > I plan to add fideduperange as an option too. User can > choose between fideduperange and ficlonerange call. > >

Re: Transactional btrfs

2018-09-08 Thread Adam Borowski
On Thu, Sep 06, 2018 at 06:08:33AM -0400, Austin S. Hemmelgarn wrote: > On 2018-09-06 03:23, Nathan Dehnel wrote: > > So I guess my question is, does btrfs support atomic writes across > > multiple files? Or is anyone interested in such a feature? > > > I'm fairly certain that it does not currentl

Re: Transactional btrfs

2018-09-08 Thread Adam Borowski
On Sat, Sep 08, 2018 at 08:45:47PM +, Martin Raiber wrote: > Am 08.09.2018 um 18:24 schrieb Adam Borowski: > > On Thu, Sep 06, 2018 at 06:08:33AM -0400, Austin S. Hemmelgarn wrote: > >> On 2018-09-06 03:23, Nathan Dehnel wrote: > >>> So I guess my question is, do

Re: python-btrfs v10 preview... detailed usage reporting and a tutorial

2018-09-23 Thread Adam Borowski
On Sun, Sep 23, 2018 at 11:54:12PM +0200, Hans van Kranenburg wrote: > Two examples have been added, which use the new code. I would appreciate > extra testing. Please try them and see if the reported numbers make sense: > > space_calculator.py > --- > Best to be initially describe

Re: python-btrfs v10 preview... detailed usage reporting and a tutorial

2018-10-07 Thread Adam Borowski
On Mon, Oct 08, 2018 at 02:03:44AM +0200, Hans van Kranenburg wrote: > And yes, when promoting things like the new show_usage example to > programs that are easily available, users will probably start parsing > the output of them with sed and awk which is a total abomination and the > absolute oppo

Re: Filesystem mounts fine but hangs on access

2018-11-04 Thread Adam Borowski
On Sun, Nov 04, 2018 at 06:29:06PM +, Duncan wrote: > So do consider adding noatime to your mount options if you haven't done > so already. AFAIK, the only /semi-common/ app that actually uses atimes > these days is mutt (for read-message tracking), and then not for mbox, so > you should be

Re: Btrfs progs release 5.11

2021-03-07 Thread Adam Borowski
On Fri, Mar 05, 2021 at 02:36:05PM +0100, David Sterba wrote: > btrfs-progs version 5.11 have been released. W: btrfs-progs source: absolute-symbolic-link-target-in-source ci/images/ci-centos-7-x86_64/docker-build -> /home/dsterba/labs/btrfs-progs/ci/images/docker-build W: btrfs-progs source: ab

Re: [PATCH v2 00/10] fsdax,xfs: Add reflink&dedupe support for fsdax

2021-03-13 Thread Adam Borowski
On Wed, Mar 10, 2021 at 02:26:43PM +, Matthew Wilcox wrote: > On Wed, Mar 10, 2021 at 08:21:59AM -0600, Goldwyn Rodrigues wrote: > > DAX on btrfs has been attempted[1]. Of course, we could not > > But why? A completeness fetish? I don't understand why you decided > to do this work. * xfs ca

Re: [PATCH v2 00/10] fsdax,xfs: Add reflink&dedupe support for fsdax

2021-03-13 Thread Adam Borowski
On Sat, Mar 13, 2021 at 11:24:00AM -0500, Neal Gompa wrote: > On Sat, Mar 13, 2021 at 8:09 AM Adam Borowski wrote: > > > > On Wed, Mar 10, 2021 at 02:26:43PM +, Matthew Wilcox wrote: > > > On Wed, Mar 10, 2021 at 08:21:59AM -0600, Goldwyn Rodrigues wrote: >

Fwd: btrfs-progs: libbtrfsutil is under LGPL-3.0 and statically liked into btrfs

2021-03-17 Thread Adam Borowski
This is https://bugs.debian.org/985400 - Forwarded message from Claudius Heine - Dear Maintainer, I looked into the licenses of the btrfs-progs project and found that the libbtrfsutils library is licensed under LGPL-3.0-or-later [1] The `copyright` file does not show this this. IANAL,

Re: Parent transid verify failed (and more): BTRFS for data storage in Xen VM setup

2021-04-11 Thread Adam Borowski
On Sun, Apr 11, 2021 at 12:10:34PM +0500, Roman Mamedov wrote: > On Sat, 10 Apr 2021 17:06:22 -0600 > Chris Murphy wrote: > > > Right. The block device (partition containing the Btrfs file system) > > must be exclusively used by one kernel, host or guest. Dom0 or DomU. > > Can't be both. > > > >

[PATCH resend 1/2] btrfs-progs: fix kernel version parsing on some versions past 3.0

2019-02-25 Thread Adam Borowski
The code fails if the third section is missing (like "4.18") or is followed by anything but "." or "-". This happens for example if we're not exactly at a tag and CONFIG_LOCALVERSION_AUTO=n (which results in "4.18.5+"). Signed-off-by: Adam Borowski -

[PATCH resend 2/2] btrfs-progs: defrag: open files RO on new enough kernels

2019-02-25 Thread Adam Borowski
616d374efa23). Signed-off-by: Adam Borowski --- cmds-filesystem.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmds-filesystem.c b/cmds-filesystem.c index b8beec13..0eb052dc 100644 --- a/cmds-filesystem.c +++ b/cmds-filesystem.c @@ -26,6 +26,7 @@ #include #include

Re: [PATCH URGENT v1.1 0/2] btrfs-progs: Fix the nobarrier behavior of write

2019-03-27 Thread Adam Borowski
On Wed, Mar 27, 2019 at 05:46:50PM +0800, Qu Wenruo wrote: > This urgent patchset can be fetched from github: > https://github.com/adam900710/btrfs-progs/tree/flush_super > Which is based on v4.20.2. > > Before this patch, btrfs-progs writes to the fs has no barrier at all. > All metadata and supe

Re: [PATCH 01/15] btrfs: create a mount option for dax

2019-03-27 Thread Adam Borowski
On Tue, Mar 26, 2019 at 12:10:01PM -0700, Matthew Wilcox wrote: > On Tue, Mar 26, 2019 at 02:02:47PM -0500, Goldwyn Rodrigues wrote: > > The dax option is restricted to non multi-device mounts. > > dax interacts with the device directly instead of using bio, so > > all bio-hooks which we use for mu

Re: [PATCH v2 00/15] btrfs dax support

2019-03-27 Thread Adam Borowski
On Tue, Mar 26, 2019 at 02:09:08PM -0500, Goldwyn Rodrigues wrote: > This patch set adds support for dax on the BTRFS filesystem. This patchset doesn't seem to support MAP_SYNC, which is the usual way to use (and detect) DAX. Basically, it requests for page faults to be synchronous -- ie, when a

[PATCH] btrfs: allow MAP_SYNC mmap

2019-03-28 Thread Adam Borowski
Used by userspace to detect DAX. Signed-off-by: Adam Borowski --- fs/btrfs/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 196c8f37ff9d..8efdb040bc1d 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -16,6 +16,7 @@ #include #include

Re: [PATCH] btrfs: allow MAP_SYNC mmap

2019-03-28 Thread Adam Borowski
[kdave: like the rest of btrfs+DAX patchset, this is WIP of course] > diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c > index 196c8f37ff9d..8efdb040bc1d 100644 > --- a/fs/btrfs/file.c > +++ b/fs/btrfs/file.c > @@ -16,6 +16,7 @@ > +#include > + .mmap_supported_flags = MAP_SYNC, With this, the

Re: BTRFS Raid 5 Space missing - ideas ?

2019-04-20 Thread Adam Borowski
On Sat, Apr 20, 2019 at 12:46:16PM +0200, Juergen Sauer wrote: > I wish a happy Easer Days before :) Same to you! > During my tests with BTRFS as Raid5 setup, I found a courious little > "problem". > Total devices 3 FS bytes used 9.98TiB > devid1 size 9.09TiB used 4.99TiB pat

Re: [PATCH 00/17] Add support for SHA-256 checksums

2019-05-17 Thread Adam Borowski
On Fri, May 17, 2019 at 09:07:03PM +0200, Johannes Thumshirn wrote: > On Fri, May 17, 2019 at 08:36:23PM +0200, Diego Calleja wrote: > > If btrfs needs an algorithm with good performance/security ratio, I would > > suggest considering BLAKE2 [1]. It is based in the BLAKE algorithm that > > made

Re: [PATCH 12/18] btrfs: allow MAP_SYNC mmap

2019-05-23 Thread Adam Borowski
On Thu, May 23, 2019 at 03:44:49PM +0200, Jan Kara wrote: > On Mon 29-04-19 12:26:43, Goldwyn Rodrigues wrote: > > From: Adam Borowski > > > > Used by userspace to detect DAX. > > [rgold...@suse.com: Added CONFIG_FS_DAX around mmap_supported_flags] > > Why t

Re: Citation Needed: BTRFS Failure Resistance

2019-05-23 Thread Adam Borowski
On Thu, May 23, 2019 at 10:24:28AM -0600, Chris Murphy wrote: > On Thu, May 23, 2019 at 5:19 AM Austin S. Hemmelgarn > > BTRFS explicitly requests write barriers to prevent that type of > > reordering of writes from happening, and it's actually pretty unusual on > > modern hardware for those write

[PATCH] btrfs-progs: check: fix option parsing for -E

2019-06-17 Thread Adam Borowski
It has a mandatory argument, thus it always crashed. Signed-off-by: Adam Borowski --- check/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check/main.c b/check/main.c index 731c21d3..b2f0c810 100644 --- a/check/main.c +++ b/check/main.c @@ -9923,7 +9923,7 @@ int

Re: [PATCH 1/2] vfs: allow dedupe of user owned read-only files

2018-05-11 Thread Adam Borowski
On Fri, May 11, 2018 at 12:26:50PM -0700, Mark Fasheh wrote: > The permission check in vfs_dedupe_file_range() is too coarse - We > only allow dedupe of the destination file if the user is root, or > they have the file open for write. > > This effectively limits a non-root user from deduping their

Re: [PATCH 2/2] vfs: dedupe should return EPERM if permission is not granted

2018-05-13 Thread Adam Borowski
On Fri, May 11, 2018 at 05:06:34PM -0700, Darrick J. Wong wrote: > On Fri, May 11, 2018 at 12:26:51PM -0700, Mark Fasheh wrote: > > Right now we return EINVAL if a process does not have permission to dedupe a > > file. This was an oversight on my part. EPERM gives a true description of > > the natu

Re: [PATCH 1/2] vfs: allow dedupe of user owned read-only files

2018-05-13 Thread Adam Borowski
On Sun, May 13, 2018 at 06:16:53PM +, Mark Fasheh wrote: > On Sat, May 12, 2018 at 04:49:20AM +0200, Adam Borowski wrote: > > On Fri, May 11, 2018 at 12:26:50PM -0700, Mark Fasheh wrote: > > > The permission check in vfs_dedupe_file_range() is too coarse - We > > &g

Re: [PATCH v2 2/3] btrfs: balance: add args info during start and resume

2018-05-16 Thread Adam Borowski
On Wed, May 16, 2018 at 10:57:57AM +0300, Nikolay Borisov wrote: > On 16.05.2018 05:51, Anand Jain wrote: > > Balance args info is an important information to be reviewed for the > > system audit. So this patch adds it to the kernel log. > > > > Example: > > > > -> btrfs bal start -dprofiles='rai

[PATCH 0/2] btrfs: fix races between exec and defrag

2018-05-21 Thread Adam Borowski
Hi! Here's a patch to fix ETXTBSY races between defrag and exec -- similar to what was just submitted for dedupe, even to the point of being followed by a second patch that replaces EINVAL with EPERM. As defrag is not something you're going to do on files you don't write, I skipped complex rules a

[PATCH 1/2] btrfs: allow defrag on a file opened ro that has rw permissions

2018-05-21 Thread Adam Borowski
's no reason to consider it a rw operation. Thus, let's check only whether the file could have been opened rw. Such access control is still needed as currently defrag can use extra disk space, and might trigger bugs. Signed-off-by: Adam Borowski --- fs/btrfs/ioctl.c | 3 ++- 1 file ch

[PATCH 2/2] btrfs: defrag: return EPERM not EINVAL when only permissions fail

2018-05-21 Thread Adam Borowski
eyond strerror(). Signed-off-by: Adam Borowski --- fs/btrfs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index b75db9d72106..ae6a110987a7 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2563,7 +2563,7 @@ stati

[PATCH] defrag: open files RO

2018-05-21 Thread Adam Borowski
NOT FOR MERGING -- requires kernel versioning Fixes EXTXBSY races. Signed-off-by: Adam Borowski --- cmds-filesystem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmds-filesystem.c b/cmds-filesystem.c index 30a50bf5..7eb6b7bb 100644 --- a/cmds-filesystem.c +++ b/cmds

Re: [PATCH RFC] btrfs: Do extra device generation check at mount time

2018-06-28 Thread Adam Borowski
On Thu, Jun 28, 2018 at 03:04:43PM +0800, Qu Wenruo wrote: > There is a reporter considering btrfs raid1 has a major design flaw > which can't handle nodatasum files. > > Despite his incorrect expectation, btrfs indeed doesn't handle device > generation mismatch well. > > This means if one device

Re: unsolvable technical issues?

2018-06-28 Thread Adam Borowski
On Wed, Jun 27, 2018 at 08:50:11PM +0200, waxhead wrote: > Chris Murphy wrote: > > On Thu, Jun 21, 2018 at 5:13 PM, waxhead wrote: > > > According to this: > > > > > > https://stratis-storage.github.io/StratisSoftwareDesign.pdf > > > Page 4 , section 1.2 > > > > > > It claims that BTRFS still ha

Re: Resizing BTRFS - raw partition

2016-11-02 Thread Adam Borowski
On Wed, Nov 02, 2016 at 09:29:26AM +, Hugo Mills wrote: > On Wed, Nov 02, 2016 at 10:18:03AM +0100, Christian Völker wrote: > > thanks for the quick reply. Regarding version- I prefer to use stable > > Linux versionsand I am not going to upgrade just btrfs outside of > > the verndors builds

[PATCH] btrfs: make block group flags in balance printks human-readable

2016-11-04 Thread Adam Borowski
They're not even documented anywhere, letting users with no recourse but to RTFS. It's no big burden to output the bitfield as words. Also, display unknown flags as hex. Signed-off-by: Adam Borowski --- fs/btrfs/relocation.c | 34 -- 1 file c

  1   2   3   >