Add address output in dax_iomap_pfn() in order to perform a memcpy() in
CoW case. Since this function both output address and pfn, rename it to
dax_iomap_direct_access().
Signed-off-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
Reviewed-by: Ritesh Harjani
---
fs/dax.c | 16
The core logic in the two dax page fault functions is similar. So, move
the logic into a common helper function. Also, to facilitate the
addition of new features, such as CoW, switch-case is no longer used to
handle different iomap types.
Signed-off-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
The dax page fault code is too long and a bit difficult to read. And it
is hard to understand when we trying to add new features. Some of the
PTE/PMD codes have similar logic. So, factor them as helper functions to
simplify the code.
Signed-off-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
Rev
The page fault part of fsdax code is little complex. In order to add CoW
feature and make it easy to understand, I was suggested to factor some
helper functions to simplify the current dax code.
(Rebased on v5.12-rc5)
==
Shiyang Ruan (3):
fsdax: Factor helpers to simplify dax fault code
fsdax
On 07/04/2021 00:24, Goldwyn Rodrigues wrote:
From: Goldwyn Rodrigues
Since struct reada_control is defined in ctree.h,
Use struct reada_control pointer as a function argument for
btrfs_reada_wait() instead of a void pointer in order > to avoid type-casting
within the function.
yep.
Signed
On 07/04/2021 00:24, Goldwyn Rodrigues wrote:
From: Goldwyn Rodrigues
btrfs_reada_detach() is not called by any function. Remove.
btrfs_reada_detach() was never used.
commit 48a3b6366f69 (btrfs: make static code static & remove dead code)
spared it.
IMO ok to remove btrfs_reada_detach(
On 2021/4/6 上午10:31, Anand Jain wrote:
On 05/04/2021 14:14, Qu Wenruo wrote:
On 2021/4/3 下午7:08, David Sterba wrote:
On Thu, Mar 25, 2021 at 03:14:32PM +0800, Qu Wenruo wrote:
This patchset can be fetched from the following github repo, along with
the full subpage RW support:
https://gith
On 07/04/2021 00:48, David Sterba wrote:
On Mon, Apr 05, 2021 at 05:18:32PM +0800, Su Yue wrote:
On Mon 05 Apr 2021 at 16:38, Anand Jain
wrote:
Ping again.
It's already queued in misc-next.
commit 441737bb30f83914bb8517f52088c0130138d74b (misc-next)
Author: Anand Jain
Date: Fri Jul 1
btrfs trims fiemap extents to the inputted offset, which leads to
inconsistent results for most inputs, and downright bizarre outputs like
[7..6] when the trimmed extent is at the end of an extent and shorter
than 512 bytes.
This test covers a bunch of cases like that and ensures that file
systems
btrfs trims fiemap extents to the inputted offset, which leads to
inconsistent results for most inputs, and downright bizarre outputs like
[7..6] when the trimmed extent is at the end of an extent and shorter
than 512 bytes.
This test covers a bunch of cases like that and ensures that file
systems
`xfs_io -c 'fiemap ' `
can give surprising results on btrfs that differ from xfs.
btrfs spits out extents trimmed to fit the user input. If the user's
fiemap request has an offset, then rather than returning each whole
extent which intersects that range, we also trim the start extent to not
have
On Sun, Mar 21, 2021 at 09:03:11PM +, Matthew Wilcox (Oracle) wrote:
> Implement readahead_batch_length() to determine the number of bytes in
> the current batch of readahead pages and use it in btrfs.
>
> Signed-off-by: Matthew Wilcox (Oracle)
Thanks, I'll take it through my tree as btrfs i
On Thu, Apr 01, 2021 at 04:03:39PM +0800, Wan Jiabing wrote:
> struct btrfs_inode is declared twice. One is declared at 67th line.
> The blew declaration is not needed. Remove the duplicate.
> struct btrfs_fs_info should be declared in the forward declarations.
> Move it to the forward declarations
On Tue, Apr 06, 2021 at 10:31:58AM +0800, Anand Jain wrote:
> On 05/04/2021 14:14, Qu Wenruo wrote:
> >
> >
> > On 2021/4/3 下午7:08, David Sterba wrote:
> >> On Thu, Mar 25, 2021 at 03:14:32PM +0800, Qu Wenruo wrote:
> >>> This patchset can be fetched from the following github repo, along with
> >
On Mon, Apr 05, 2021 at 02:14:34PM +0800, Qu Wenruo wrote:
>
>
> On 2021/4/3 下午7:08, David Sterba wrote:
> > On Thu, Mar 25, 2021 at 03:14:32PM +0800, Qu Wenruo wrote:
> >> This patchset can be fetched from the following github repo, along with
> >> the full subpage RW support:
> >> https://githu
On Fri, Mar 12, 2021 at 03:25:23PM -0500, Josef Bacik wrote:
> This can fail for any number of reasons, why bring the whole box down
> with it?
I've written something more relevant for the code change.
> Reviewed-by: Qu Wenruo
> Signed-off-by: Josef Bacik
> ---
> fs/btrfs/relocation.c | 3 ++-
On Mon, Apr 05, 2021 at 05:18:32PM +0800, Su Yue wrote:
>
> On Mon 05 Apr 2021 at 16:38, Anand Jain
> wrote:
>
> > Ping again.
> >
> It's already queued in misc-next.
> commit 441737bb30f83914bb8517f52088c0130138d74b (misc-next)
> Author: Anand Jain
> Date: Fri Jul 17 18:05:25 2020 +0800
N
From: Goldwyn Rodrigues
Since struct reada_control is defined in ctree.h,
Use struct reada_control pointer as a function argument for
btrfs_reada_wait() instead of a void pointer in order
to avoid type-casting within the function.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 2 +-
f
From: Goldwyn Rodrigues
btrfs_reada_detach() is not called by any function. Remove.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 1 -
fs/btrfs/reada.c | 9 +
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index f2fd73e58ee6.
On Tue 06 Apr 2021 at 21:24, Naohiro Aota
wrote:
On Tue, Apr 06, 2021 at 06:54:37PM +0800, Su Yue wrote:
On Tue 06 Apr 2021 at 16:05, Naohiro Aota
wrote:
> This is the userland counterpart of the following series.
>
>
https://lore.kernel.org/linux-btrfs/20200225035626.1049501-1-naohi
In case the right buffer is emptied it's first set to null and
subsequently it's dereferenced to get its size to pass to root_sub_used.
This naturally leads to a null pointer dereference. The correct thing
to do is to pass the stashed right->len in "blocksize".
Fixes #296
Signed-off-by: Nikolay B
On Tue, Apr 06, 2021 at 06:54:37PM +0800, Su Yue wrote:
>
> On Tue 06 Apr 2021 at 16:05, Naohiro Aota wrote:
>
> > This is the userland counterpart of the following series.
> >
> > https://lore.kernel.org/linux-btrfs/20200225035626.1049501-1-naohiro.a...@wdc.com/
> >
> > This series refactors
On Mon, Apr 05, 2021 at 06:14:46PM +0800, Zheng Yongjun wrote:
> mutex lock can be initialized automatically with DEFINE_MUTEX()
> rather than explicitly calling mutex_init().
>
> Reported-by: Hulk Robot
> Signed-off-by: Zheng Yongjun
You've sent this patch already and haven't provided the answ
On Tue 06 Apr 2021 at 16:05, Naohiro Aota
wrote:
This is the userland counterpart of the following series.
https://lore.kernel.org/linux-btrfs/20200225035626.1049501-1-naohiro.a...@wdc.com/
This series refactors chunk allocation and device_extent
allocation
functions and make them genera
On 06/04/2021 10:07, Naohiro Aota wrote:
> This is the userland counterpart of the following series.
>
> https://lore.kernel.org/linux-btrfs/20200225035626.1049501-1-naohiro.a...@wdc.com/
>
> This series refactors chunk allocation and device_extent allocation
> functions and make them generalized
alloc_chunk_ctl::calc_size is actually the stripe_size in the kernel side
code. Let's rename it to clarify what the "calc" is.
Signed-off-by: Naohiro Aota
---
kernel-shared/volumes.c | 56 -
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/
Chunk_bytes_by_type() takes type, calc_size, and ctl as arguments. But the
first two can be obtained from the ctl. Let's drop these arguments for
simplicity.
Signed-off-by: Naohiro Aota
---
kernel-shared/volumes.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/k
Since commit b9444efb6658 ("btrfs-progs: don't pretend RAID56 has a
different stripe length"), alloc_chunk_ctl::stripe_len is always fixed to
BTRFS_STRIPE_LEN. Let's replace alloc_chunk_ctl::stripe_len with
BTRFS_STRIPE_LEN, like in the kernel code.
Signed-off-by: Naohiro Aota
---
kernel-shared/
Several calculations in the chunk allocation process use this pattern.
x /= y;
x *= y;
Replace this pattern with round_down().
Signed-off-by: Naohiro Aota
---
kernel-shared/volumes.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/kernel-shared/volumes.
In the DUP profile, we can use only half of the space available in a device
extent. Fix the calculation of calc_size for it.
Signed-off-by: Naohiro Aota
---
kernel-shared/volumes.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel-shared/volumes.c b/kernel-shared/vol
Factor out create_chunk() from btrfs_alloc_chunk(). This new function
creates a chunk.
There is no functional changes.
Signed-off-by: Naohiro Aota
---
kernel-shared/volumes.c | 217 ++--
1 file changed, 120 insertions(+), 97 deletions(-)
diff --git a/kernel-
btrfs_alloc_data_chunk() and create_chunk() have the most part in common.
Let's rewrite btrfs_alloc_data_chunk() using create_chunk().
There are two differences between btrfs_alloc_data_chunk() and
create_chunk(). create_chunk() uses find_next_chunk() to decide the logical
address of the chunk, an
Factor out decide_stripe_size() from btrfs_alloc_chunk(). This new function
calculates the actual stripe size to allocate and decides the size of a
stripe (ctl->calc_size).
This commit has no functional changes.
Signed-off-by: Naohiro Aota
---
kernel-shared/volumes.c | 44 ++
Convert alloc_chunk_ctl::type to take the original type in
btrfs_alloc_chunk(). This will help refactoring in the following commits.
Signed-off-by: Naohiro Aota
---
kernel-shared/volumes.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel-shared/volumes.c b/kernel-
Move parameter initialization code for regular allocator to
init_alloc_chunk_ctl_policy_regular(). This will help adding another
allocator in the future.
Signed-off-by: Naohiro Aota
---
kernel-shared/volumes.c | 112 +++-
1 file changed, 64 insertions(+), 48 d
Factor out the function dev_extent_search_start() from
find_free_dev_extent_start() to decide the starting position of a device
extent search.
Signed-off-by: Naohiro Aota
---
kernel-shared/volumes.c | 24
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/ker
This is the userland counterpart of the following series.
https://lore.kernel.org/linux-btrfs/20200225035626.1049501-1-naohiro.a...@wdc.com/
This series refactors chunk allocation and device_extent allocation
functions and make them generalized to be able to implement other
allocation policy easi
Introduce chunk allocation policy for btrfs. This policy controls how
chunks and device extents are allocated from devices.
Signed-off-by: Naohiro Aota
---
kernel-shared/volumes.c | 1 +
kernel-shared/volumes.h | 6 ++
2 files changed, 7 insertions(+)
diff --git a/kernel-shared/volumes.c b/
38 matches
Mail list logo