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
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-
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
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
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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
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
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
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
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
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
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
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
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
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 ;
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
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
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
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
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.
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 |
* 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 +++--
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
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
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
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,
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
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
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
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
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
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(
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
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
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(
> >> +
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
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
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
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
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
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
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
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
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
63 matches
Mail list logo