Re: [PATCH] Btrfs: Improve FL_KEEP_SIZE handling in fallocate.

2015-04-20 Thread Davide Italiano
On Mon, Apr 6, 2015 at 10:09 PM, Davide Italiano dccitali...@gmail.com wrote: - We call inode_size_ok() only if FL_KEEP_SIZE isn't specified. - As an optimisation we can skip the call if (off + len) isn't greater than the current size of the file. This operation is called under the lock so

Kernel BUG at fs/btrfs/ctree.c:3163

2015-04-20 Thread Francis McBratney
Hi folks, Reporting this here too as per the How do I report bugs and issues? section on the wiki. I managed to trigger the following BUG_ON() whilst running 'apt purge':- [ 85.635305] kernel BUG at fs/btrfs/ctree.c:3163! [ 85.635350] invalid opcode: [#1] SMP [ 85.635398] Modules

Carefully crafted BTRFS-image causes kernel to crash

2015-04-20 Thread Lukas Lueg
See also https://bugzilla.kernel.org/show_bug.cgi?id=96971 I've identified some problems in the btrfs code and attached a btrfs-image which causes the userland tools to crash and the kernel to immediately freeze once the filesystem get's mounted and one of the files is accessed. Putting the

Re: The FAQ on fsync/O_SYNC

2015-04-20 Thread Zygo Blaxell
On Mon, Apr 20, 2015 at 06:07:09AM +, Duncan wrote: 4.0 is out. There's reason people may want to stick one version back by default, to 3.19 currently, since it can take a few weeks for early reports to develop into a coherent problem, and sticking one stable series back allows for

Re: [PATCH] btrfs-progs: fix btrfs quota rescan failed on PPC64 arch

2015-04-20 Thread 王旭
Thanks for review. On Mon, Apr 20, 2015 at 10:47 PM, Eric Sandeen sand...@redhat.com wrote: On 4/20/15 12:33 AM, xuw2...@gmail.com wrote: From: George Wang xuw2...@gmail.com snip This means the value _IOW* will be negative when we store it in the int variables. Such as the

[PATCH v2 1/1] btrfs-progs: optionally restore metadata

2015-04-20 Thread Dan Merillat
As long as the inode is intact, the file metadata can be restored. Directory data is restored at the end of search_dir. Errors are checked and returned, unless ignore_errors is requested. Signed-off-by: Dan Merillat dan.meril...@gmail.com --- Documentation/btrfs-restore.txt | 3 ++

[PATCH v2 0/1] btrfs-progs: optionally restore metadata

2015-04-20 Thread Dan Merillat
Changes since v1: * Documented in the manpage * Added to usage() for btrfs restore * Made it an optional flag (-m/--restore-metadata) * Use endian-safe macros to access the on-disk data. * Restore the proper mtime instead of atime twice. * Restore owner and mode * Restore metadata for directories

[PATCH v2] Btrfs-progs: fix typo in btrfs-device.txt

2015-04-20 Thread Anand Jain
From: Anand Jain anand.j...@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com --- v1-v2: Oh no. Typo while fixing typo. oops ! thanks Duncan. Documentation/btrfs-device.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/btrfs-device.txt

Re: Carefully crafted BTRFS-image causes kernel to crash

2015-04-20 Thread Qu Wenruo
Original Message Subject: Carefully crafted BTRFS-image causes kernel to crash From: Lukas Lueg lukas.l...@gmail.com To: linux-btrfs@vger.kernel.org Date: 2015年04月21日 07:04 See also https://bugzilla.kernel.org/show_bug.cgi?id=96971 I've identified some problems in the

Re: [PATCH] Btrfs-progs: fix typo in btrfs-device.txt

2015-04-20 Thread Duncan
Anand Jain posted on Mon, 20 Apr 2015 18:31:29 +0800 as excerpted: Signed-off-by: Anand Jain anand.j...@oracle.com --- Documentation/btrfs-device.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/btrfs-device.txt b/Documentation/btrfs-device.txt index

Re: [PATCH] btrfs-progs: optionally enforce chroot for btrfs receive

2015-04-20 Thread lauri
Hi, the last one added missing goto. I'll try to make clear differences next time :) -- 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: [PATCH 3/3] btrfs: set FS_SUPPORTS_SEEK_HOLE flag.

2015-04-20 Thread Al Viro
On Mon, Apr 20, 2015 at 02:48:55AM -0700, Christoph Hellwig wrote: On Mon, Apr 20, 2015 at 10:46:49AM +0100, David Howells wrote: NeilBrown ne...@suse.de wrote: Missing patch 2 of the 3-patch series? Yes. :-) Do ext4 and xfs support this, do you know? Yes. As do f2fs, ocfs2,

Re: unable to mount a btrfs file system kernel 3.19.2

2015-04-20 Thread Némoz Saint-Dizier, Olivier
Oh, I didn't see there were similar link in the wiki, my bad. Thank you for your prompt answer :) Olivier. On 4/20/2015 12:27 PM, Hugo Mills wrote: On Mon, Apr 20, 2015 at 12:16:33PM +0200, Némoz Saint-Dizier, Olivier wrote: Hello everyone, I have an issue with my ssd where a btrfs partition

Re: unable to mount a btrfs file system kernel 3.19.2

2015-04-20 Thread Holger Hoffstätte
On Mon, 20 Apr 2015 12:16:33 +0200, Némoz Saint-Dizier, Olivier wrote: Hello everyone, I have an issue with my ssd where a btrfs partition is located. I have a /dev/sdb1 in ext4 for the /boot, and the rest of the ssd is /dev/sdb2 which is the root of my Archlinux. When I boot, it hangs up

Re: 3.18.11 - no space left on device and 'fi usage' shows lots

2015-04-20 Thread Filipe David Manana
On Sun, Apr 19, 2015 at 9:15 PM, Joel Best joelb...@gmail.com wrote: Hi all, We have recently had major issues with our large btrfs volume crashing and remounting read-only because it thinks it's out of space. The volume is 55TB on h/w raid 6 with 44TB free and the server is running Ubuntu

[PATCH 2/2] btrfs-progs: device delete to accept devid

2015-04-20 Thread Anand Jain
This patch introduces new option devid for the command btrfs device delete device_path|devid[..] mnt In a user reported issue on a 3-disk-RAID1, one disk failed with its SB unreadable. Now with this patch user will have a choice to delete the device using devid. The other method we could do,

[PATCH 1/2] btrfs-progs: move is_numerical to utils-lib.h and make it non static

2015-04-20 Thread Anand Jain
Signed-off-by: Anand Jain anand.j...@oracle.com --- cmds-replace.c | 11 --- utils-lib.c| 11 +++ utils.h| 1 + 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/cmds-replace.c b/cmds-replace.c index 63d34f9..6ea7c61 100644 --- a/cmds-replace.c +++

[PATCH] device delete by devid

2015-04-20 Thread Anand Jain
Current method to identify and verify the user provided device_path needs device SB to be accessible. In situations where SB isn't accessible or read fails. Using devid will help. Anand Jain (1): Btrfs: device delete by devid fs/btrfs/ioctl.c | 50

Re: snapshot destruction making IO extremely slow

2015-04-20 Thread Marc Cousin
On 31/03/2015 19:05, David Sterba wrote: On Mon, Mar 30, 2015 at 05:09:52PM +0200, Marc Cousin wrote: So it would be good to sample the active threads and see where it's spending the time. It could be the somewhere in the rb-tree representing extents, but that's a guess. I just need to be

Re: [PATCH/RFC] fscache/cachefiles versus btrfs

2015-04-20 Thread David Howells
NeilBrown ne...@suse.de wrote: I managed to reproduce the bug, and when I applied your patches I cannot any more. So it looks like you've fixed it - thanks. I hope so too. Now I just hope Linus takes the patches. That just leave the bmap issue. I'll post a patch which causes lseek to be

Re: [PATCH 3/3] btrfs: set FS_SUPPORTS_SEEK_HOLE flag.

2015-04-20 Thread Christoph Hellwig
On Mon, Apr 20, 2015 at 10:46:49AM +0100, David Howells wrote: NeilBrown ne...@suse.de wrote: Missing patch 2 of the 3-patch series? Yes. :-) Do ext4 and xfs support this, do you know? Yes. As do f2fs, ocfs2, gfs2, ceph and NFSv4.2 David ---end quoted text--- -- To unsubscribe

Re: [PATCH 2/3] fscache/cachefiles: optionally use SEEK_DATA instead of -bmap.

2015-04-20 Thread David Howells
NeilBrown ne...@suse.de wrote: @@ -721,24 +733,45 @@ int cachefiles_read_or_alloc_pages(struct fscache_retrieval *op, We can actually do better than this what you've done here for cachefiles_read_or_alloc_pages(). We can use SEEK_DATA to check the beginning of a run of pages and then

Re: [PATCH 2/3] fscache/cachefiles: optionally use SEEK_DATA instead of -bmap.

2015-04-20 Thread Christoph Hellwig
On Mon, Apr 20, 2015 at 04:27:00PM +1000, NeilBrown wrote: A worthwhile goal, but I certainly wouldn't consider pursuing it until what I have submitted so far as been accepted - let's not reject good while waiting for perfect. It's still broken. You add conditional flag for the almost right

Re: [PATCH 3/3] btrfs: set FS_SUPPORTS_SEEK_HOLE flag.

2015-04-20 Thread David Howells
NeilBrown ne...@suse.de wrote: Missing patch 2 of the 3-patch series? Yes. :-) Do ext4 and xfs support this, do you know? David -- 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

Fwd: [PATCH] fs/btrfs: use inode_set_flags() instead of set_mask_bits()

2015-04-20 Thread Zhang Zhen
Use inode_set_flags() instead of set_mask_bits() according to commit 5f16f3225b062 (ext4: atomically set inode-i_flags in ext4_set_inode_flags()). Signed-off-by: Zhang Zhen zhenzhang.zh...@huawei.com --- fs/btrfs/ioctl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH] Btrfs: device delete by devid

2015-04-20 Thread Anand Jain
This introduces BTRFS_IOC_RM_DEV_V2, which can accept devid as an argument to delete the device. Current only choice to is to pass device path for the device delete cli, but if btrfs is unable to read device SB, then cli fails. And user won't be able to delete the device. With this patch now the

Re: [PATCH 3/3] btrfs: set FS_SUPPORTS_SEEK_HOLE flag.

2015-04-20 Thread David Howells
NeilBrown ne...@suse.de wrote: + .fs_flags = FS_REQUIRES_DEV | FS_BINARY_MOUNTDATA | + FS_SUPPORTS_SEEK_HOLE, I must be missing something: warthoggit merge linus/master Already up-to-date. warthogstg id

unable to mount a btrfs file system kernel 3.19.2

2015-04-20 Thread Némoz Saint-Dizier, Olivier
Hello everyone, I have an issue with my ssd where a btrfs partition is located. I have a /dev/sdb1 in ext4 for the /boot, and the rest of the ssd is /dev/sdb2 which is the root of my Archlinux. When I boot, it hangs up after loading the kernel. So I tried with an Archlinux liveboot, and I have

[PATCH] Btrfs-progs: fix typo in btrfs-device.txt

2015-04-20 Thread Anand Jain
Signed-off-by: Anand Jain anand.j...@oracle.com --- Documentation/btrfs-device.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/btrfs-device.txt b/Documentation/btrfs-device.txt index 4bb5ea5..0bc1be3 100644 --- a/Documentation/btrfs-device.txt +++

[PATCH] fs/btrfs: use inode_set_flags() instead of set_mask_bits()

2015-04-20 Thread Zhang Zhen
Use inode_set_flags() instead of set_mask_bits() according to commit 5f16f3225b062 (ext4: atomically set inode-i_flags in ext4_set_inode_flags()). Signed-off-by: Zhang Zhen zhenzhang.zh...@huawei.com --- fs/btrfs/ioctl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

Re: [PATCH 3/3] btrfs: set FS_SUPPORTS_SEEK_HOLE flag.

2015-04-20 Thread NeilBrown
On Mon, 20 Apr 2015 09:47:42 +0100 David Howells dhowe...@redhat.com wrote: NeilBrown ne...@suse.de wrote: + .fs_flags = FS_REQUIRES_DEV | FS_BINARY_MOUNTDATA | + FS_SUPPORTS_SEEK_HOLE, I must be missing something: warthoggit merge linus/master

Re: The FAQ on fsync/O_SYNC

2015-04-20 Thread Gian-Carlo Pascutto
On 20-04-15 06:27, Zygo Blaxell wrote: I'm curious as to whether +C has any effect on BTRFS's durability, too. I would expect it to be strictly equal to or worse than the CoW durability. In addition to the stuff pointed out, I've wondered about this: PostgreSQL full_page_writes copies 8k

Re: unable to mount a btrfs file system kernel 3.19.2

2015-04-20 Thread Hugo Mills
On Mon, Apr 20, 2015 at 12:16:33PM +0200, Némoz Saint-Dizier, Olivier wrote: Hello everyone, I have an issue with my ssd where a btrfs partition is located. I have a /dev/sdb1 in ext4 for the /boot, and the rest of the ssd is /dev/sdb2 which is the root of my Archlinux. When I boot, it hangs

Re: corruption in USB harddrive - backup via send/receive - question

2015-04-20 Thread Miguel Negrão
On 20-04-2015 15:07, Sander wrote: Miguel Negrão wrote (ao): - Given that I'm running a laptop and comunicating with the harddrives via USB, is it expected that I will get some corruption from time to time or is this abnormal Abnormal. I have three Intel ssd's usb connected to an Arndale.

Re: [PATCH] btrfs-progs: fix btrfs quota rescan failed on PPC64 arch

2015-04-20 Thread Eric Sandeen
On 4/20/15 12:33 AM, xuw2...@gmail.com wrote: From: George Wang xuw2...@gmail.com PPC64 arch use such following IOC values \#define _IOC_NONE 1U \#define _IOC_READ 2U \#define _IOC_WRITE 4U comparing to the default IOC values \#define _IOC_NONE 0U \#define

Is btrfs on top of bcache stable now?

2015-04-20 Thread Marc MERLIN
On Mon, Apr 20, 2015 at 10:27:05AM +, Hugo Mills wrote: See the first issue here: https://btrfs.wiki.kernel.org/index.php/Gotchas Hi Hugo, looking at the page again, I see bcache + btrfs does not seem to be stable yet linking to a thread more than 2 years old and btrfs kernels that

Re: corruption in USB harddrive - backup via send/receive - question

2015-04-20 Thread Sander
Miguel Negrão wrote (ao): - Given that I'm running a laptop and comunicating with the harddrives via USB, is it expected that I will get some corruption from time to time or is this abnormal Abnormal. I have three Intel ssd's usb connected to an Arndale. Two of them have luks and btrfs raid0

Re: btrfs send to file differences

2015-04-20 Thread Hugo Mills
On Mon, Apr 20, 2015 at 02:15:47PM +, sri wrote: Hi, I have a subvolume with only one file (file.txt) with 5Mb size. under /btrfs/subvol1/ 1) I have created 1st snapshot /btrfs/snap1_subvol1. Then I ran btrfs send and given -f out1.img size of out1.img is 5Mb. 2) Next, I have

btrfs send to file differences

2015-04-20 Thread sri
Hi, I have a subvolume with only one file (file.txt) with 5Mb size. under /btrfs/subvol1/ 1) I have created 1st snapshot /btrfs/snap1_subvol1. Then I ran btrfs send and given -f out1.img size of out1.img is 5Mb. 2) Next, I have appended 1Mb data to file.txt And again created snapshot

Re: The FAQ on fsync/O_SYNC

2015-04-20 Thread Zygo Blaxell
On Mon, Apr 20, 2015 at 10:13:47AM +0200, Gian-Carlo Pascutto wrote: On 20-04-15 06:27, Zygo Blaxell wrote: I'm curious as to whether +C has any effect on BTRFS's durability, too. I would expect it to be strictly equal to or worse than the CoW durability. In addition to the stuff

Re: Is btrfs on top of bcache stable now?

2015-04-20 Thread Fábio Pfeifer
I'm one of those that used to have problems with btrfs on top of bcache. After some corruptions, I gave up this setup. Recently (from February, I think) I gave it another shot, and I have had no problems since. I use bcache in writeback mode, with very good performance. I'm feeling btrfs very

[RFC][PATCH] cachefiles: Make better use of SEEK_DATA/SEEK_HOLE

2015-04-20 Thread David Howells
Here's a test patch that makes better use of SEEK_DATA/SEEK_HOLE in cachefiles_read_or_alloc_pages() by caching data/hole information to use on the subsequent pages in the list. Note that the pages list needs to be transited in reverse for this to work as it seems that the list passed to the fs

Re: how to clone a btrfs filesystem

2015-04-20 Thread Christoph Anton Mitterer
On Mon, 2015-04-20 at 05:23 +, Duncan wrote: Which, given the common developer wisdom about premature optimization, can be explained. But accepting that explanation, one is still stymied by the fact that all the previous warnings about btrfs being in heavy development, keep good

Re: The FAQ on fsync/O_SYNC

2015-04-20 Thread Duncan
Zygo Blaxell posted on Mon, 20 Apr 2015 00:27:31 -0400 as excerpted: Normal writes to btrfs filesystems using the versioned filesystem tree are consistent(ish), atomic, and durable; however, they have high latency as the filesystem normally delays commit until triggered by a periodic timer

Re: [PATCH 3/3] btrfs: set FS_SUPPORTS_SEEK_HOLE flag.

2015-04-20 Thread Chris Mason
On 04/20/2015 01:27 AM, NeilBrown wrote: This allows fscache to cachefiles in a btrfs filesystem. Thanks for working on this Neil. Signed-off-by: Chris Mason c...@fb.com -chris Signed-off-by: NeilBrown ne...@suse.de --- fs/btrfs/super.c |3 ++- 1 file changed, 2 insertions(+), 1

Re: [PATCH 2/3] fscache/cachefiles: optionally use SEEK_DATA instead of -bmap.

2015-04-20 Thread Christoph Hellwig
Please just usse SEEK_HOLE/DATA support unconditioanlly. -bmap is a horrible hack that is completely unsafe. -- 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

Re: [PATCH 2/3] fscache/cachefiles: optionally use SEEK_DATA instead of -bmap.

2015-04-20 Thread NeilBrown
On Sun, 19 Apr 2015 23:08:18 -0700 Christoph Hellwig h...@infradead.org wrote: Please just usse SEEK_HOLE/DATA support unconditioanlly. -bmap is a horrible hack that is completely unsafe. A worthwhile goal, but I certainly wouldn't consider pursuing it until what I have submitted so far as