Re: Bad fs performance, IO freezes

2015-10-29 Thread cheater00 .
Hi Liu, after talking with Holger I believe turning off COW on this FS will work to alleviate this issue. However, even with COW on, btrfs shouldn't be making my computer freeze every 5 seconds... especially while the disk is written to at mere tens of kilobytes per second. It's not even the disk

Re: [PATCH 6/6] btrfs-progs: Avoid use pointer in handle_options

2015-10-29 Thread David Sterba
On Thu, Oct 29, 2015 at 05:31:48PM +0800, Zhao Lei wrote: > +static void check_options(int argc, char **argv) > { > + if (argc == 0) > + return; > + > + const char *arg = argv[0]; Declaration after statements, fixed at commit time. > + > + if (arg[0] != '-' || > +

Re: Bad fs performance, IO freezes

2015-10-29 Thread Austin S Hemmelgarn
On 2015-10-29 09:03, cheater00 . wrote: Hi Liu, after talking with Holger I believe turning off COW on this FS will work to alleviate this issue. However, even with COW on, btrfs shouldn't be making my computer freeze every 5 seconds... especially while the disk is written to at mere tens of

Re: [PATCHv2] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-10-29 Thread David Sterba
On Thu, Oct 29, 2015 at 08:22:21AM +, Luke Dashjr wrote: > 32-bit ioctl uses these rather than the regular FS_IOC_* versions. They can > be handled in btrfs using the same code. Without this, 32-bit {ch,ls}attr > fail. > > Signed-off-by: Luke Dashjr > Cc:

Re: [PATCH 3/6] btrfs-progs: free fslabel for btrfs-convert

2015-10-29 Thread David Sterba
On Thu, Oct 29, 2015 at 05:31:45PM +0800, Zhao Lei wrote: > fslabel need to be freed before exit. > > Signed-off-by: Zhao Lei > --- > btrfs-convert.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/btrfs-convert.c b/btrfs-convert.c > index 5b9171e..1693d03

Question about Object IDs

2015-10-29 Thread Quad Cores
Hello, On the Btrfs wiki link : https://btrfs.wiki.kernel.org/index.php/Trees, under the section 'FS Tree' it says that the trees are numbered 5,256,257 and so on, and the top level subvolume has the ID 5; and the first created subvolume has an ID of 256. However, after installing btrfs on my

Re: [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-10-29 Thread Thomas Rohwer
Hello, I've investigated this now, and it seems to be the pointer-type clone_sources member of struct btrfs_ioctl_send_args. I can't think of a perfect way to fix this, but it might not be *too* ugly to: - replace the current clone_sources with a u64 that must always be (u64)-1; this causes

Re: [PATCH 1/6] btrfs-progs: fix floating point exception for btrfs-calc-size

2015-10-29 Thread David Sterba
Hi, paches 1,2,4,5,6 applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Bad fs performance, IO freezes

2015-10-29 Thread cheater00 .
Hi Austin, seek times are fine, but this literally freezes my computer for a split second. I've had to re-type this email twice because the freezes meant letters I typed would not arrive on the screen. USB disks are so common they should not be having issues. I have 4.3.0-040300rc7-generic

Re: [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-10-29 Thread David Sterba
On Thu, Oct 29, 2015 at 01:05:13PM +0100, Thomas Rohwer wrote: > Investigating the source, I noticed that probably the problem is the member > clone_sources in the structure That's, right. Yet another thing to keep in mind when designing ioctls. > struct btrfs_ioctl_send_args { >__s64

Re: [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-10-29 Thread David Sterba
On Thu, Oct 29, 2015 at 08:22:34AM +, Luke Dashjr wrote: > > > I don't see what is different with that implementation. All > > > f2fs_compat_ioctl does is change cmd to the plain-IOC equivalent and > > > call f2fs_ioctl with the same arg (compat_ptr merely causes a cast to > > > void* and

Re: [PATCHv2] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-10-29 Thread Josef Bacik
On 10/29/2015 04:22 AM, Luke Dashjr wrote: 32-bit ioctl uses these rather than the regular FS_IOC_* versions. They can be handled in btrfs using the same code. Without this, 32-bit {ch,ls}attr fail. Looks good, thanks, Reviewed-by: Josef Bacik -- To unsubscribe from this

Re: Bad fs performance, IO freezes

2015-10-29 Thread Henk Slager
The graph uploaded shows 'Up speed' and 'Down speed', I just assumed that this is network speed and not disk I/O. Is this correct assumption? If so, how does the traffic to/from the /dev/sdX look like (e.g. iostat or ksysguard) ? W.r.t. USB: I had quite some trouble with NEC/Renesas USB3 host

Re: [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-10-29 Thread Thomas Rohwer
I suggest to add an anonymous union and add a u64 member that would force the type width: struct btrfs_ioctl_send_args { __s64 send_fd; /* in */ __u64 clone_sources_count; /* in */ union { __u64 __user *clone_sources;/* in */

Re: [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-10-29 Thread Luke Dashjr
On Thursday, October 29, 2015 7:36:35 PM Thomas Rohwer wrote: > > I suggest to add an anonymous union and add a u64 member that would > > force the type width: > > > > struct btrfs_ioctl_send_args { > > > > __s64 send_fd; /* in */ > > __u64 clone_sources_count;

Re: [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-10-29 Thread Luke Dashjr
On Thursday, October 29, 2015 2:39:32 PM David Sterba wrote: > On Thu, Oct 29, 2015 at 08:22:34AM +, Luke Dashjr wrote: > > > In what way is SEND broken? There are only u64/s64 members in > > > btrfs_ioctl_send_args, I don't see how this could break on 32/64 > > > userspace/kernel. > > > >

Re: Bad fs performance, IO freezes

2015-10-29 Thread Austin S Hemmelgarn
On 2015-10-29 11:49, cheater00 . wrote: Hi Austin, seek times are fine, but this literally freezes my computer for a split second. I've had to re-type this email twice because the freezes meant letters I typed would not arrive on the screen. USB disks are so common they should not be having

Re: random i/o error without error in dmesg

2015-10-29 Thread Marc Joliet
On Wednesday 28 October 2015 05:21:13 Duncan wrote: >Marc Joliet posted on Tue, 27 Oct 2015 21:54:40 +0100 as excerpted: >>>IOW, does it take a full reboot to clear the problem, or is a simple >>>ro/rw mount cycle enough, or an unmount/remount? >>> >> Seems that a full reboot is needed, but I

Re: corrupted RAID1: unsuccessful recovery / help needed

2015-10-29 Thread Lukas Pirl
TL;DR: thanks but recovery still preferred over recreation. Hello Duncan and thanks for your reply! On 10/26/2015 09:31 PM, Duncan wrote: FWIW... Older btrfs userspace such as your v3.17 is "OK" for normal runtime use, assuming you don't need any newer features, as in normal runtime, it's the

Re: [PATCH v3 06/21] btrfs: delayed_ref: Add new function to record reserved space into delayed ref

2015-10-29 Thread Chris Mason
On Wed, Oct 28, 2015 at 02:36:42PM +0100, Holger Hoffstätte wrote: > On Tue, Oct 27, 2015 at 12:34 PM, Chris Mason wrote: > > On Tue, Oct 27, 2015 at 05:05:56PM +0800, Qu Wenruo wrote: > >> > >> > >> Chris Mason wrote on 2015/10/27 02:12 -0400: > >> >On Tue, Oct 27, 2015 at

Re: [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-10-29 Thread Luke Dashjr
On Friday, May 15, 2015 11:19:22 AM David Sterba wrote: > On Thu, May 14, 2015 at 04:27:54PM +, Luke Dashjr wrote: > > On Thursday, May 14, 2015 2:06:17 PM David Sterba wrote: > > > On Wed, May 13, 2015 at 05:15:26PM +, Luke Dashjr wrote: > > > > 32-bit ioctl uses these rather than the

[PATCH] btrfs: Fix a data space underflow warning

2015-10-29 Thread Qu Wenruo
Even with quota disabled, generic/127 will trigger a kernel warning by underflow data space info. The bug is caused by buffered write, which in case of short copy, the start parameter for btrfs_delalloc_release_space() is wrong, and round_up/down() in btrfs_delalloc_release() extents the range to

[PATCH 4/6] btrfs-progs: Fix uninitialized key.type for btrfs_find_free_objectid

2015-10-29 Thread Zhao Lei
To avoid using uninitialized value in btrfs_search_slot(). Signed-off-by: Zhao Lei --- inode-map.c | 1 + 1 file changed, 1 insertion(+) diff --git a/inode-map.c b/inode-map.c index 1321bfb..346952b 100644 --- a/inode-map.c +++ b/inode-map.c @@ -44,6 +44,7 @@ int

[PATCHv2] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-10-29 Thread Luke Dashjr
32-bit ioctl uses these rather than the regular FS_IOC_* versions. They can be handled in btrfs using the same code. Without this, 32-bit {ch,ls}attr fail. Signed-off-by: Luke Dashjr Cc: sta...@vger.kernel.org --- fs/btrfs/ctree.h | 1 + fs/btrfs/file.c | 2 +-

[PATCH 3/6] btrfs-progs: free fslabel for btrfs-convert

2015-10-29 Thread Zhao Lei
fslabel need to be freed before exit. Signed-off-by: Zhao Lei --- btrfs-convert.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/btrfs-convert.c b/btrfs-convert.c index 5b9171e..1693d03 100644 --- a/btrfs-convert.c +++ b/btrfs-convert.c @@ -3027,6 +3027,9 @@ int

[PATCH 2/6] btrfs-progs: Fix negative eb's ref_cnt in btrfs-calc-size

2015-10-29 Thread Zhao Lei
btrfs-calc-size show following warning: # btrfs-calc-size /dev/sda6 Calculating size of root tree ... extent_io.c:582: free_extent_buffer: Assertion `eb->refs < 0` failed. ./btrfs-calc-size[0x41d642] ./btrfs-calc-size(free_extent_buffer+0x70)[0x41e1c1]

[PATCH 1/6] btrfs-progs: fix floating point exception for btrfs-calc-size

2015-10-29 Thread Zhao Lei
Current code exit with floating point exception on a blank fs: # btrfs-calc-size -b /dev/sda6 Calculating size of root tree Total size: 16384 Inline data: 0 Total seeks: 0 Forward seeks: 0 Backward seeks: 0 Floating point

[PATCH 5/6] btrfs-progs: free comparer_set in cmd_qgroup_show

2015-10-29 Thread Zhao Lei
comparer_set, which was allocated by malloc(), should be free before function return. Signed-off-by: Zhao Lei --- cmds-qgroup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmds-qgroup.c b/cmds-qgroup.c index a64b716..f069d32 100644 ---

[PATCH 6/6] btrfs-progs: Avoid use pointer in handle_options

2015-10-29 Thread Zhao Lei
We use pointer of argc and argv in handle_options() because they are necessary in very old code which are not exist now. This patch move to use argc and argv directly in handle_options(), alone with following update: 1: rename handle_options() to check_options() to fit its function. 2: cleanup

Re: [3/3] btrfs: qgroup: Fix a rebase bug which will cause qgroup double free

2015-10-29 Thread Johannes Henninger
Tested-by: Johannes Henninger -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: How to replicate a Xen VM using BTRFS as the root filesystem.

2015-10-29 Thread Austin S Hemmelgarn
On 2015-10-28 22:39, Russell Coker wrote: On Wed, 28 Oct 2015 11:07:20 PM Austin S Hemmelgarn wrote: Using this methodology, I can have a new Gentoo PV domain running in about half an hour, whereas it takes me at least two and a half hours (and often much longer than that) when using the

bad handling of unpartitioned device in sysfs_devno_to_wholedisk() (which breaks mkfs.btrfs)

2015-10-29 Thread Tom Yan
So I noticed that SSD detection does work on unpartitioned devices in mkfs.btrfs somehow: https://bugzilla.kernel.org/show_bug.cgi?id=102921 Later I found out that it breaks at blkid_devno_to_wholedisk() in is_ssd():