Re: [PATCH v2 5/8] btrfs: add helpers for FS_XFLAG_* conversion

2018-05-09 Thread Nikolay Borisov
On 9.05.2018 16:54, David Sterba wrote: > Preparatory work for the FS_IOC_FSGETXATTR ioctl, basic conversions and > checking helpers. > > Signed-off-by: David Sterba > --- > fs/btrfs/ioctl.c | 32 > 1 file changed, 32 insertions(+) > > diff --git a/fs/btrfs/i

Re: [PATCH v2 4/8] btrfs: rename btrfs_flags_to_ioctl to reflect which flags it touches

2018-05-09 Thread Nikolay Borisov
On 9.05.2018 16:54, David Sterba wrote: > Converts btrfs_inode::flags to the FS_*_FL flags. What about : btrfs_to_iflags(struct btrfs_inode *inode) or BTRFS_IFLAGS(ip) (macro) or btrfs_iflags(ip) (function). I'm more inclined towards one of the shorter function/macro variants. > > Signed-

Re: [PATCH v2 2/8] btrfs: rename btrfs_mask_flags to reflect which flags it touches

2018-05-09 Thread Nikolay Borisov
On 9.05.2018 16:54, David Sterba wrote: > The FS_*_FL flags cannot be easily identified by a variable name prefix > but we still need to recognize them so the 'fsflags' should be closer to > the naming scheme but again the 'fs' part sounds like it's a filesystem > flag. I don't have a better ide

Re: [PATCH v2 1/8] btrfs: rename btrfs_update_iflags to reflect which flags it touches

2018-05-09 Thread Nikolay Borisov
On 9.05.2018 16:54, David Sterba wrote: > The btrfs inode flag flavour is now simply called 'inode flags' and the > vfs inode are i_flags. Also rename the internal variable to something > less confusing than 'ip'. > > Signed-off-by: David Sterba > --- > fs/btrfs/ctree.h | 2 +- > fs/btrfs/ino

[PATCH 07/10] Btrfs: refactor btrfs_evict_inode() reserve refill dance

2018-05-09 Thread Omar Sandoval
From: Omar Sandoval The truncate loop in btrfs_evict_inode() does two things at once: - It refills the temporary block reserve, potentially stealing from the global reserve or committing - It calls btrfs_truncate_inode_items() The tangle of continues hides the fact that these two steps are ac

[PATCH] btrfs: test ENOSPC caused by many orphan items

2018-05-09 Thread Omar Sandoval
From: Omar Sandoval Btrfs has a bug where we can prematurely ENOSPC if we have lots of orphaned files, i.e., deleted files which are still open. Add a test which repeatedly creates and deletes a file while keeping all of the file descriptors open. This should succeed but doesn't on Btrfs without

[PATCH 04/10] Btrfs: stop creating orphan items for truncate

2018-05-09 Thread Omar Sandoval
From: Omar Sandoval Currently, we insert an orphan item during a truncate so that if there's a crash, we don't leak extents past the on-disk i_size. However, since commit 7f4f6e0a3f6d ("Btrfs: only update disk_i_size as we remove extents"), we keep disk_i_size in sync with the extent items as we

[PATCH 05/10] Btrfs: don't release reserve or decrement orphan count if orphan item already existed

2018-05-09 Thread Omar Sandoval
From: Omar Sandoval Currently, if btrfs_insert_orphan_item() fails, we release the reserved space and decrement root->orphan_inodes. However, we also ignore -EEXIST errors, so we still want the space reservation for when we delete the item, and we still need to count the orphan because we're stil

[PATCH 03/10] Btrfs: don't BUG_ON() in btrfs_truncate_inode_items()

2018-05-09 Thread Omar Sandoval
From: Omar Sandoval btrfs_free_extent() can fail because of ENOMEM. There's no reason to panic here, we can just abort the transaction. Fixes: f4b9aa8d3b87 ("btrfs_truncate") Signed-off-by: Omar Sandoval --- fs/btrfs/inode.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH 06/10] Btrfs: don't return ino if inode item removal fails

2018-05-09 Thread Omar Sandoval
From: Omar Sandoval In btrfs_evict_inode(), if btrfs_truncate_inode_items() fails, the inode item will still be in the tree but we still return the ino to the ino cache. That will blow up later when someone tries to allocate that ino, so don't return it to the cache. Fixes: 581bb050941b ("Btrfs:

[PATCH 09/10] Btrfs: get rid of unused orphan infrastructure

2018-05-09 Thread Omar Sandoval
From: Omar Sandoval Now that we don't keep long-standing reservations for orphan items, we can get rid of root->orphan_lock and root->orphan_block_rsv, as well as some related functions. Signed-off-by: Omar Sandoval --- fs/btrfs/ctree.h | 5 - fs/btrfs/disk-io.c | 8 f

[PATCH 10/10] Btrfs: reserve space for O_TMPFILE orphan item deletion

2018-05-09 Thread Omar Sandoval
From: Omar Sandoval btrfs_link() calls btrfs_orphan_del() if it's linking an O_TMPFILE but it doesn't reserve space to do so. Even before the removal of the orphan_block_rsv it wasn't using it. Fixes: ef3b9af50bfa ("Btrfs: implement inode_operations callback tmpfile") Signed-off-by: Omar Sandova

[PATCH 08/10] Btrfs: fix ENOSPC caused by orphan items reservations

2018-05-09 Thread Omar Sandoval
From: Omar Sandoval Currently, we keep space reserved for all inode orphan items until the inode is evicted (i.e., all references to it are dropped). We hit an issue where an application would keep a bunch of deleted files open (by design) and thus keep a large amount of space reserved, causing E

[PATCH 02/10] Btrfs: fix error handling in btrfs_truncate_inode_items()

2018-05-09 Thread Omar Sandoval
From: Omar Sandoval btrfs_truncate_inode_items() uses two variables for error handling, ret and err. These are not handled consistently, leading to a couple of bugs. - Errors from btrfs_del_items() are handled but not propagated to the caller - If btrfs_run_delayed_refs() fails and aborts the

[PATCH 01/10] Btrfs: remove stale comment referencing vmtruncate()

2018-05-09 Thread Omar Sandoval
From: Omar Sandoval Commit a41ad394a03b ("Btrfs: convert to the new truncate sequence") changed vmtruncate() to truncate_setsize() but didn't update the comment above it. truncate_setsize() never fails (the IS_SWAPFILE() check happens elsewhere), so remove the comment. Signed-off-by: Omar Sandov

[PATCH 00/10] Btrfs: orphan and truncate fixes

2018-05-09 Thread Omar Sandoval
From: Omar Sandoval Hi, At Facebook we hit an early ENOSPC issue which we tracked down to the reservations for orphan items of deleted-but-still-open files. The primary function of this series is to fix that bug, but I ended up uncovering a pile of other issues in the process, most notably that

Re: [PATCH] btrfs: fix invalid memory access with journal_info

2018-05-09 Thread robbieko
Omar Sandoval 於 2018-05-10 12:53 寫到: On Wed, May 09, 2018 at 06:35:25PM +0800, robbieko wrote: From: Robbie Ko When send process requires memory allocation, shrinker may be triggered due to insufficient memory. Then evict_inode gets called when inode is freed, and this function may need to s

Re: [PATCH] btrfs: fix invalid memory access with journal_info

2018-05-09 Thread Omar Sandoval
On Wed, May 09, 2018 at 06:35:25PM +0800, robbieko wrote: > From: Robbie Ko > > When send process requires memory allocation, shrinker may be triggered > due to insufficient memory. > Then evict_inode gets called when inode is freed, and this function > may need to start transaction. > However, t

[PATCH 3/3] btrfs-progs: print-tree: Enhance btrfs_print_tree() check to avoid out-of-boundary memory access

2018-05-09 Thread Qu Wenruo
For btrfs_print_tree(), if nr_items is corrupted, it can easily go beyond extent buffer boundary. Add extra nr_item check, and only print as many valid slots as possible. Signed-off-by: Qu Wenruo --- changelog: v2: Use better loop condition suggested by Su. --- print-tree.c | 10 +- 1

[PATCH v2] btrfs: return original error code when failing from option parsing

2018-05-09 Thread Chengguang Xu
It's no good to overwrite -ENOMEM using -EINVAL when failing from mount option parsing, so just return original error code. Signed-off-by: Chengguang Xu Reviewed-by: David Sterba Reviewed-by: Qu Wenruo --- v1->v2: - Remove bracket for single line branch. fs/btrfs/super.c | 4 +--- 1 file chan

Re: [PATCH 1/2] btrfs-progs: check: Make btrfs check return error for qgroup mismatch

2018-05-09 Thread Qu Wenruo
On 2018年05月09日 01:45, David Sterba wrote: > On Mon, Apr 30, 2018 at 02:16:59PM +0800, Qu Wenruo wrote: >> Current btrfs-check will check qgroup consistency, but even when it >> finds something wrong, the return value is still 0. >> >> Fix it by allowing report_qgroups() to return int to indicate

Re: [PATCH] btrfs: return original error code when failing from option parsing

2018-05-09 Thread Qu Wenruo
On 2018年05月10日 08:34, Qu Wenruo wrote: > > > On 2018年05月09日 21:08, Chengguang Xu wrote: >> It's no good to overwrite -ENOMEM using -EINVAL when failing >> from mount option parsing, so just return original error code. >> >> Signed-off-by: Chengguang Xu > > Reviewed-by: Qu Wenruo > > Thanks,

Re: [PATCH] btrfs: return original error code when failing from option parsing

2018-05-09 Thread Qu Wenruo
On 2018年05月09日 21:08, Chengguang Xu wrote: > It's no good to overwrite -ENOMEM using -EINVAL when failing > from mount option parsing, so just return original error code. > > Signed-off-by: Chengguang Xu Reviewed-by: Qu Wenruo Thanks, Qu > --- > fs/btrfs/super.c | 1 - > 1 file changed, 1

Re: [PATCH 1/2] fs: hoist BTRFS_IOC_[SG]ET_FSLABEL to vfs

2018-05-09 Thread David Sterba
On Wed, May 09, 2018 at 11:01:21AM -0500, Eric Sandeen wrote: > Move the btrfs label ioctls up to the vfs for general use. > > This retains 256 chars as the maximum size through the interface, which > is the btrfs limit and AFAIK exceeds any other filesystem's maximum > label size. > > Signed-off

Re: [PATCH 1/2] fs: hoist BTRFS_IOC_[SG]ET_FSLABEL to vfs

2018-05-09 Thread Eric Sandeen
On 5/9/18 12:35 PM, Randy Dunlap wrote: > On 05/09/2018 09:01 AM, Eric Sandeen wrote: >> Move the btrfs label ioctls up to the vfs for general use. >> >> This retains 256 chars as the maximum size through the interface, which >> is the btrfs limit and AFAIK exceeds any other filesystem's maximum

Re: [PATCH 1/2] fs: hoist BTRFS_IOC_[SG]ET_FSLABEL to vfs

2018-05-09 Thread Randy Dunlap
On 05/09/2018 09:01 AM, Eric Sandeen wrote: > Move the btrfs label ioctls up to the vfs for general use. > > This retains 256 chars as the maximum size through the interface, which > is the btrfs limit and AFAIK exceeds any other filesystem's maximum > label size. > > Signed-off-by: Eric Sandeen

Re: [PATCH 1/2] fs: hoist BTRFS_IOC_[SG]ET_FSLABEL to vfs

2018-05-09 Thread Darrick J. Wong
On Wed, May 09, 2018 at 11:15:46AM -0600, Andreas Dilger wrote: > On May 9, 2018, at 10:10 AM, Darrick J. Wong wrote: > > > > On Wed, May 09, 2018 at 11:01:21AM -0500, Eric Sandeen wrote: > >> Move the btrfs label ioctls up to the vfs for general use. > >> > >> This retains 256 chars as the maxi

Re: [PATCH 1/2] fs: hoist BTRFS_IOC_[SG]ET_FSLABEL to vfs

2018-05-09 Thread Andreas Dilger
On May 9, 2018, at 10:10 AM, Darrick J. Wong wrote: > > On Wed, May 09, 2018 at 11:01:21AM -0500, Eric Sandeen wrote: >> Move the btrfs label ioctls up to the vfs for general use. >> >> This retains 256 chars as the maximum size through the interface, which >> is the btrfs limit and AFAIK exceed

Re: [PATCH] test online label ioctl

2018-05-09 Thread Eric Sandeen
On 5/9/18 10:49 AM, Eryu Guan wrote: > On Mon, Apr 30, 2018 at 04:43:18PM -0500, Eric Sandeen wrote: >> This tests the online label ioctl that btrfs has, which has been >> recently proposed for XFS. >> >> To run, it requires an updated xfs_io with the label command and a >> filesystem that supports

Re: [PATCH v2 1/2] Btrfs: fiemap: pass correct bytenr when fm_extent_count is zero

2018-05-09 Thread Nikolay Borisov
On 7.05.2018 11:42, robbieko wrote: > From: Robbie Ko > > [BUG] > fm_mapped_extents is not correct when fm_extent_count is 0 > Like: ># mount /dev/vdb5 /mnt/btrfs ># dd if=/dev/zero bs=16K count=4 oflag=dsync of=/mnt/btrfs/file ># xfs_io -c "fiemap -v" /mnt/btrfs/file >/mnt/btr

Re: [PATCH 2/2] man2: New page documenting filesystem get/set label ioctls

2018-05-09 Thread Darrick J. Wong
On Wed, May 09, 2018 at 11:04:03AM -0500, Eric Sandeen wrote: > This documents the proposed new vfs-level ioctls which can > get or set a mounted filesytem's label. > > Signed-off-by: Eric Sandeen > --- > > btrfs folks, please verify that this accurately describes your > current behavior, thanks

Re: [PATCH 1/2] fs: hoist BTRFS_IOC_[SG]ET_FSLABEL to vfs

2018-05-09 Thread Darrick J. Wong
On Wed, May 09, 2018 at 11:01:21AM -0500, Eric Sandeen wrote: > Move the btrfs label ioctls up to the vfs for general use. > > This retains 256 chars as the maximum size through the interface, which > is the btrfs limit and AFAIK exceeds any other filesystem's maximum > label size. > > Signed-off

[PATCH 2/2] man2: New page documenting filesystem get/set label ioctls

2018-05-09 Thread Eric Sandeen
This documents the proposed new vfs-level ioctls which can get or set a mounted filesytem's label. Signed-off-by: Eric Sandeen --- btrfs folks, please verify that this accurately describes your current behavior, thanks. diff --git a/man2/ioctl_fslabel.2 b/man2/ioctl_fslabel.2 new file mode 1006

[PATCH 1/2] fs: hoist BTRFS_IOC_[SG]ET_FSLABEL to vfs

2018-05-09 Thread Eric Sandeen
Move the btrfs label ioctls up to the vfs for general use. This retains 256 chars as the maximum size through the interface, which is the btrfs limit and AFAIK exceeds any other filesystem's maximum label size. Signed-off-by: Eric Sandeen --- Let the bikeshedding on the exact ioctl name begin ;

[PATCH 0/2] hoist btrfs' label set/get ioctls to vfs, and document

2018-05-09 Thread Eric Sandeen
I'm planning to add online label set/get support to xfs, and to do so I plan to re-use the existing btrfs ioctls, BTRFS_IOC_[SG]ET_FSLABEL We're still working out minor details on the xfs side, but I'd like to start the conversation regarding the new more generic interface ASAP, so here goes - pat

Re: [PATCH] test online label ioctl

2018-05-09 Thread Eryu Guan
On Mon, Apr 30, 2018 at 04:43:18PM -0500, Eric Sandeen wrote: > This tests the online label ioctl that btrfs has, which has been > recently proposed for XFS. > > To run, it requires an updated xfs_io with the label command and a > filesystem that supports it > > A slight change here to _require_x

[PATCH] Btrfs: fix duplicate extents after fsync of file with prealloc extents

2018-05-09 Thread fdmanana
From: Filipe Manana In commit 471d557afed1 ("Btrfs: fix loss of prealloc extents past i_size after fsync log replay"), on fsync, we started to always log all prealloc extents beyond an inode's i_size in order to avoid losing them after a power failure. However under some cases this can lead to t

Re: [PATCH] btrfs: return original error code when failing from option parsing

2018-05-09 Thread David Sterba
On Wed, May 09, 2018 at 09:08:23PM +0800, Chengguang Xu wrote: > It's no good to overwrite -ENOMEM using -EINVAL when failing > from mount option parsing, so just return original error code. > > Signed-off-by: Chengguang Xu Reviewed-by: David Sterba -- To unsubscribe from this list: send the li

[PATCH v2 4/8] btrfs: rename btrfs_flags_to_ioctl to reflect which flags it touches

2018-05-09 Thread David Sterba
Converts btrfs_inode::flags to the FS_*_FL flags. Signed-off-by: David Sterba --- fs/btrfs/ioctl.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 0b84f9e68f86..40eeb99310d5 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.

[PATCH v2 3/8] btrfs: rename check_flags to reflect which flags it touches

2018-05-09 Thread David Sterba
The FS_*_FL flags cannot be easily identified by a prefix but we still need to recognize them so the 'fsflags' should be closer to the naming scheme but again the 'fs' part sounds like it's a filesystem flag. I don't have a better idea for now. Signed-off-by: David Sterba --- fs/btrfs/ioctl.c |

[PATCH v2 8/8] btrfs: unify naming of flags variables for SETFLAGS and XFLAGS

2018-05-09 Thread David Sterba
* The simple 'flags' refer to the btrfs inode * ... that's in 'binode * the FS_*_FL variables are 'fsflags' * the old copies of the variable are prefixed by 'old_' * Struct inode flags contain 'i_flags'. Signed-off-by: David Sterba --- fs/btrfs/ioctl.c | 106 +++--

[PATCH v2 6/8] btrfs: add FS_IOC_FSGETXATTR ioctl

2018-05-09 Thread David Sterba
The new ioctl is an extension to the FS_IOC_GETFLAGS and adds new flags and is extensible. This patch allows to return the xflags portion of the fsxattr structure, other items have no meaning for btrfs or can be added later. The original patch was written by Chandan Jay Sharma but was incomplete a

[PATCH v2 5/8] btrfs: add helpers for FS_XFLAG_* conversion

2018-05-09 Thread David Sterba
Preparatory work for the FS_IOC_FSGETXATTR ioctl, basic conversions and checking helpers. Signed-off-by: David Sterba --- fs/btrfs/ioctl.c | 32 1 file changed, 32 insertions(+) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 40eeb99310d5..54dfcb851ec2 10

[PATCH v2 7/8] btrfs: add FS_IOC_FSSETXATTR ioctl

2018-05-09 Thread David Sterba
The new ioctl is an extension to the FS_IOC_SETFLAGS and adds new flags and is extensible. Don't get fooled by the XATTR in the name, it does not have anything in common with the extended attributes, incidentally also abbreviated as XATTRs. This patch allows to set the xflags portion of the fsxatt

[PATCH v2 1/8] btrfs: rename btrfs_update_iflags to reflect which flags it touches

2018-05-09 Thread David Sterba
The btrfs inode flag flavour is now simply called 'inode flags' and the vfs inode are i_flags. Also rename the internal variable to something less confusing than 'ip'. Signed-off-by: David Sterba --- fs/btrfs/ctree.h | 2 +- fs/btrfs/inode.c | 4 ++-- fs/btrfs/ioctl.c | 4 ++-- 3 files changed,

[PATCH v2 0/8] Add ioctl to support extended inode flags

2018-05-09 Thread David Sterba
Changes for v2: - dropped renaming of variable from patch "btrfs: rename btrfs_flags_to_ioctl to reflect which flags it touches" - fixed the error handling in "btrfs: add FS_IOC_FSSETXATTR ioctl" - new patch to unify naming of some local variables I'm about to add this patchset to the main

[PATCH v2 2/8] btrfs: rename btrfs_mask_flags to reflect which flags it touches

2018-05-09 Thread David Sterba
The FS_*_FL flags cannot be easily identified by a variable name prefix but we still need to recognize them so the 'fsflags' should be closer to the naming scheme but again the 'fs' part sounds like it's a filesystem flag. I don't have a better idea for now. Signed-off-by: David Sterba --- fs/bt

Re: [PATCH] btrfs: qgroup: Finish rescan when hit the last leaf of extent tree

2018-05-09 Thread Qu Wenruo
On 2018年05月09日 21:00, David Sterba wrote: > On Fri, May 04, 2018 at 01:56:59PM +0800, Qu Wenruo wrote: >> Under the following case, qgroup rescan can double account cowed tree >> blocks: >> >> In this case, extent tree only has one tree block. >> >> - >> | transid=5 last committed=4 >> | btrfs_qg

[PATCH] btrfs: return original error code when failing from option parsing

2018-05-09 Thread Chengguang Xu
It's no good to overwrite -ENOMEM using -EINVAL when failing from mount option parsing, so just return original error code. Signed-off-by: Chengguang Xu --- fs/btrfs/super.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 0628092..ae6447d 100644 --- a

Re: [PATCH] btrfs: qgroup: Search commit root for rescan to avoid missing extent

2018-05-09 Thread David Sterba
On Thu, May 03, 2018 at 03:20:52PM +0800, Qu Wenruo wrote: > When doing qgroup rescan using the following script (modified from > btrfs/017 test case), we can sometimes hit qgroup corruption. > > -- > umount $dev &> /dev/null > umount $mnt &> /dev/null > > mkfs.btrfs -f -n 64k $dev > mount $d

Re: [PATCH] btrfs: qgroup: Finish rescan when hit the last leaf of extent tree

2018-05-09 Thread David Sterba
On Fri, May 04, 2018 at 01:56:59PM +0800, Qu Wenruo wrote: > Under the following case, qgroup rescan can double account cowed tree > blocks: > > In this case, extent tree only has one tree block. > > - > | transid=5 last committed=4 > | btrfs_qgroup_rescan_worker() > | |- btrfs_start_transaction(

Re: [PATCH v2] btrfs-progs: tests: test mkfs.btrfs fails on small backing size thin provision device

2018-05-09 Thread David Sterba
On Thu, Apr 12, 2018 at 09:10:28AM +0800, Su Yue wrote: > This tests is most similar to xfstests generic/405. > It calls device mapper to create a thin provision device with small > backing size and big virtual size. mkfs.btrfs should fail on such > devices. > > This test should pass after commit

Re: [PATCH 1/3] btrfs-progs: remove comments about delayed ref in backref.c

2018-05-09 Thread David Sterba
On Tue, Apr 24, 2018 at 01:52:31PM +0800, Su Yue wrote: > There is no delayed ref in btrfs-progs, so remove related comments. > > Signed-off-by: Su Yue 1-3 applied. Please send cover letter for patch series with more than 1 patch. -- To unsubscribe from this list: send the line "unsubscribe linu

Re: [PATCH 3/3] btrfs-progs: print-tree: Enhance btrfs_print_tree() check to avoid out-of-boundary memory access

2018-05-09 Thread David Sterba
On Mon, Apr 30, 2018 at 11:51:19AM +0800, Qu Wenruo wrote: > >>   btrfs_print_leaf(eb); > >>   return; > >>   } > >> +    /* We are crossing eb boundary, this node must be corrupted */ > >> +    if (nr > BTRFS_NODEPTRS_PER_EXTENT_BUFFER(eb)) > >> +    warning( > >> +   

Re: [PATCH 1/3] btrfs-progs: Remove fs_info parameter from btrfs_leaf_free_space()

2018-05-09 Thread David Sterba
On Mon, Apr 30, 2018 at 11:15:43AM +0800, Qu Wenruo wrote: > For btrfs_leaf_free_space(), to get leaf data size, we have two way to > get it: > > 1) leaf->fs_info->nodesize > 2) leaf->len > > Anyway, we could get rid of @fs_info parameter for > btrfs_leaf_free_space(). > And here we choose method

Re: [PATCH 1/3] btrfs-progs: convert: fix support for e2fsprogs < 1.42

2018-05-09 Thread David Sterba
On Mon, Apr 30, 2018 at 10:37:06AM -0400, je...@suse.com wrote: > From: Jeff Mahoney > > Commit 324d4c1857a (btrfs-progs: convert: Add larger device support) > introduced new dependencies on the 64-bit API provided by e2fsprogs. > That API was introduced in v1.42 (along with bigalloc). > > This

Re: [PATCH v2 0/3] btrfs-progs: Some fix for fi usage

2018-05-09 Thread David Sterba
On Thu, Mar 29, 2018 at 05:21:29PM +0900, Misono Tomohiro wrote: > v1->v2 > These were sent several months ago, just rebased to current devel branch. > > Patch 1 and 2 aims to fix the "fi du" to include the information of "fi df" > even when running without root privilege. > > Patch 3 is an ind

Re: [PATCH 00/10] Simplify function interfaces

2018-05-09 Thread David Sterba
On Wed, May 02, 2018 at 08:50:54AM +0300, Nikolay Borisov wrote: > On 27.03.2018 10:19, Nikolay Borisov wrote: > > A bunch of functions in lowmem mode take an 'ext_ref' parameter only to > > pass it > > down the call chain where it eventually is consumed. Turns out the functions > > which actually

Re: [PATCH 1/2] btrfs-progs: Fix DIR_ITEM checking in lowmem

2018-05-09 Thread David Sterba
On Wed, May 02, 2018 at 08:50:38AM +0300, Nikolay Borisov wrote: > > correctly. > > > > Fixes: 564901eac7a4 ("btrfs-progs: check: introduce print_dir_item_err()") > > Signed-off-by: Nikolay Borisov > > --- > > Ping Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe li

[PATCH] btrfs: fix invalid memory access with journal_info

2018-05-09 Thread robbieko
From: Robbie Ko When send process requires memory allocation, shrinker may be triggered due to insufficient memory. Then evict_inode gets called when inode is freed, and this function may need to start transaction. However, the journal_info is already points to BTRFS_SEND_TRANS_STUB, it passed th

Re: [PATCH v2 0/2] btrfs :incremental send, improve rmdir performance

2018-05-09 Thread David Sterba
On Tue, May 08, 2018 at 06:11:36PM +0800, robbieko wrote: > From: Robbie Ko > > The following patch is to improve the btrfs send, the speed of large > directory deletion. > > 1. Optimization, avoid unnecessary allocations. > > 2. Increase the speed of can_rmdir. > > Robbie Ko (2): > btrfs: i

Re: [PATCH] btrfs: incremental send, fix BUG when parent commit_root changed

2018-05-09 Thread robbieko
Hi Filipe Manana, Ok. I will add all this information, in detail, to the changelog, and than send a patch V2 later. Thanks. Robbie Ko Filipe Manana 於 2018-05-09 16:29 寫到: On Wed, May 9, 2018 at 2:10 AM, robbieko wrote: Filipe Manana 於 2018-05-08 19:12 寫到: On Tue, May 8, 2018 at 11:30 AM, r

Re: [PATCH] btrfs: incremental send, fix BUG when parent commit_root changed

2018-05-09 Thread Filipe Manana
On Wed, May 9, 2018 at 2:10 AM, robbieko wrote: > Filipe Manana 於 2018-05-08 19:12 寫到: >> >> On Tue, May 8, 2018 at 11:30 AM, robbieko wrote: >>> >>> Hi Filipe Manana, >>> >>> Although the snapshot is readonly, when the snapshot is created, >>> in order to modify the last_snapshot, it will cause