On Fri, Jun 02, 2017 at 06:58:30PM +0200, David Sterba wrote:
> Christoph pointed out that bio allocations backed by a bioset will never
> fail. As we always use a bioset for all bio allocations, we can skip
> the error handling. This patch adjusts our low-level helpers, the
> cascaded changes
From: David Miller
Date: Fri, 02 Jun 2017 14:39:06 -0400 (EDT)
> From: "Darrick J. Wong"
> Date: Fri, 2 Jun 2017 11:08:08 -0700
>
>> ext4/jbd2's crc32c implementations will also need a fix like this for
>> {ext4,jbd2}_chksum. Note that both of
From: "Darrick J. Wong"
Date: Fri, 2 Jun 2017 11:08:08 -0700
> ext4/jbd2's crc32c implementations will also need a fix like this for
> {ext4,jbd2}_chksum. Note that both of these modules call the crypto api
> directly to avoid a static dependence on libcrc32c; this was
On Fri, May 19, 2017 at 11:39:15AM -0600, Liu Bo wrote:
> We commit transaction in order to reclaim space from pinned bytes because
> it could process delayed refs, and in may_commit_transaction(), we check
> first if pinned bytes are enough for the required space, we then check if
> that plus
[add ext4 list to cc]
On Fri, Jun 02, 2017 at 11:28:54AM -0400, David Miller wrote:
>
> On sparc, if we have an alloca() like situation, as is the case with
> SHASH_DESC_ON_STACK(), we can end up referencing deallocated stack
> memory. The result can be that the value is clobbered if a trap
>
On Fri, Jun 02, 2017 at 07:34:19PM +0200, David Sterba wrote:
> On Thu, Jun 01, 2017 at 04:57:07PM +0800, Su Yue wrote:
> > When reading out name from inode_ref, dir_item, it's possible that
> > corrupted name_len leads to read beyond boundary.
> > Since there are already patches for btrfs-progs,
On Thu, Jun 01, 2017 at 04:57:07PM +0800, Su Yue wrote:
> When reading out name from inode_ref, dir_item, it's possible that
> corrupted name_len leads to read beyond boundary.
> Since there are already patches for btrfs-progs, this patchset is
> for btrfs.
>
> Introduce 'btrfs_is_namelen_valid'
On Thu, Jun 01, 2017 at 12:58:12PM +0300, Nikolay Borisov wrote:
>
>
> On 1.06.2017 11:57, Su Yue wrote:
> > Since 'iterate_dir_item' checks namelen in its way,
> > use 'btrfs_is_namelen_valid' not 'verify_dir_item'.
> >
> > Signed-off-by: Su Yue
> > ---
> >
compressed_bio_alloc is now a trivial wrapper around btrfs_bio_alloc, no
point keeping it. The error handling can be simplified, as we know
btrfs_bio_alloc will never fail.
Signed-off-by: David Sterba
---
fs/btrfs/compression.c | 23 ---
1 file changed, 4
Most callers of btrfs_bio_alloc convert from bytes to sectors. Hide that
in the helper and simplify the logic in the callsers.
Signed-off-by: David Sterba
---
fs/btrfs/compression.c | 8
fs/btrfs/extent_io.c | 6 +++---
fs/btrfs/extent_io.h | 2 +-
3 files
All callers pass GFP_NOFS.
Signed-off-by: David Sterba
---
fs/btrfs/extent_io.c | 4 ++--
fs/btrfs/extent_io.h | 2 +-
fs/btrfs/inode.c | 2 +-
fs/btrfs/volumes.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/extent_io.c
Update direct callers of btrfs_io_bio_alloc that do error handling, that
we can now remove.
Signed-off-by: David Sterba
---
fs/btrfs/check-integrity.c | 5 -
fs/btrfs/disk-io.c | 3 ---
fs/btrfs/extent_io.c | 5 -
fs/btrfs/raid56.c | 3 ---
All callers pass gfp_flags=GFP_NOFS and nr_vecs=BIO_MAX_PAGES.
Signed-off-by: David Sterba
---
fs/btrfs/compression.c | 2 +-
fs/btrfs/extent_io.c | 9 +++--
fs/btrfs/extent_io.h | 4 +---
3 files changed, 5 insertions(+), 10 deletions(-)
diff --git
Update direct callers of btrfs_bio_clone that do error handling, that we
can now remove.
Signed-off-by: David Sterba
---
fs/btrfs/inode.c | 4
fs/btrfs/volumes.c | 1 -
2 files changed, 5 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index
Update direct callers of btrfs_bio_alloc that do error handling, that we
can now remove.
Signed-off-by: David Sterba
---
fs/btrfs/extent_io.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 78a787c36a35..17f80a18e787
Christoph pointed out that bio allocations backed by a bioset will never
fail. As we always use a bioset for all bio allocations, we can skip
the error handling. This patch adjusts our low-level helpers, the
cascaded changes to all callers will come next.
CC: Christoph Hellwig
CC:
The error handling can be simplified as we do bio allocations using a bioset as
was pointed out by Christoph in
https://lkml.kernel.org/r/20170516143737.ga24...@infradead.org
David Sterba (8):
btrfs: bioset allocations will never fail, adapt our helpers
btrfs: btrfs_bio_alloc never fails,
On sparc, if we have an alloca() like situation, as is the case with
SHASH_DESC_ON_STACK(), we can end up referencing deallocated stack
memory. The result can be that the value is clobbered if a trap
or interrupt arrives at just the right instruction.
It only occurs if the function ends
On Fri, Jun 02, 2017 at 01:20:01AM -0700, Omar Sandoval wrote:
> From: Omar Sandoval
>
> btrfs_calc_trans_metadata_size() does an unsigned 32-bit multiplication,
> which can overflow if num_items >= 4 GB / (nodesize * BTRFS_MAX_LEVEL * 2).
> For a nodesize of 16kB, this overflow
On Fri, Jun 2, 2017 at 2:18 PM, Yan, Zheng wrote:
> On Fri, Jun 2, 2017 at 7:33 PM, Arnd Bergmann wrote:
>> On Fri, Jun 2, 2017 at 1:18 PM, Yan, Zheng wrote:
>> What I meant is another related problem in ceph_mkdir() where the
>> i_ctime
On Thu, Jun 01, 2017 at 09:01:26AM +0800, Qu Wenruo wrote:
>
>
> At 05/31/2017 10:30 PM, David Sterba wrote:
> > On Wed, May 31, 2017 at 08:31:35AM +0800, Qu Wenruo wrote:
> Yes it's hard to find such deadlock especially when lockdep will not
> detect it.
>
> And this makes
On Wed, May 31, 2017 at 01:56:10PM +0800, Qu Wenruo wrote:
> +# prepare loop device using specified size and path
> +# $1: path of the file
> +# $2: size of the device, optional, default value is '2G'
> +prepare_loop_dev()
> +{
> + local path="$1"
> + local size="$2"
> +
> + [[ "$path"
On Wed, May 31, 2017 at 01:56:04PM +0800, Qu Wenruo wrote:
> This patchset will fix a false alert in lowmem mode, which doesn't handle
> RAID0/5/6/10 chunk well. (the 5th patch)
>
> Along the lowmem fix, also enhance and cleanup some chunk verification code,
> as lowmem mode and original mode are
On Fri, Jun 02, 2017 at 12:07:37PM +0300, Nikolay Borisov wrote:
> > +# Make sure that we didn't leak any metadata space.
> > +if [[ $FSTYP = btrfs ]]; then
> > + uuid="$(findmnt -n -o UUID "$TEST_DIR")"
>
> if we are on btrfs and we don't have findmnt this test will likely fail.
> Perhaps
On Fri, Jun 2, 2017 at 7:33 PM, Arnd Bergmann wrote:
> On Fri, Jun 2, 2017 at 1:18 PM, Yan, Zheng wrote:
>> On Fri, Jun 2, 2017 at 6:51 PM, Arnd Bergmann wrote:
>>> On Fri, Jun 2, 2017 at 12:10 PM, Yan, Zheng wrote:
On
On Fri, Jun 2, 2017 at 1:18 PM, Yan, Zheng wrote:
> On Fri, Jun 2, 2017 at 6:51 PM, Arnd Bergmann wrote:
>> On Fri, Jun 2, 2017 at 12:10 PM, Yan, Zheng wrote:
>>> On Fri, Jun 2, 2017 at 5:45 PM, Arnd Bergmann wrote:
On
On Fri, Jun 2, 2017 at 6:51 PM, Arnd Bergmann wrote:
> On Fri, Jun 2, 2017 at 12:10 PM, Yan, Zheng wrote:
>> On Fri, Jun 2, 2017 at 5:45 PM, Arnd Bergmann wrote:
>>> On Fri, Jun 2, 2017 at 4:09 AM, Yan, Zheng wrote:
On
On Fri, Jun 2, 2017 at 12:10 PM, Yan, Zheng wrote:
> On Fri, Jun 2, 2017 at 5:45 PM, Arnd Bergmann wrote:
>> On Fri, Jun 2, 2017 at 4:09 AM, Yan, Zheng wrote:
>>> On Fri, Jun 2, 2017 at 8:57 AM, Deepa Dinamani
>>>
On Fri, Jun 2, 2017 at 5:45 PM, Arnd Bergmann wrote:
> On Fri, Jun 2, 2017 at 4:09 AM, Yan, Zheng wrote:
>> On Fri, Jun 2, 2017 at 8:57 AM, Deepa Dinamani
>> wrote:
>>> On Thu, Jun 1, 2017 at 5:36 PM, John Stultz
711a0b48683b71d61caffbd67a90ec8db5412675 is incomplete and missed the
case in btrfs_del_ptr(), where multiple items are removed.
> Running "btrfsck --repair /dev/sdd2" crashed as it can happen in
> (corrupted) file systems, that slot > nritems.
> ...
> in that case the count of remaining items
711a0b48683b71d61caffbd67a90ec8db5412675 is incomplete and missed some
cases, where 'nritems' is outside its valid range, e.g.
- insert_ptr(): inserting into an already full node
- copy_for_split(): splitting more items than contained
- btrfs_del_ptr(): deleting one item from an already empty node
Hi,
thank you for applying my last patch, but regarding my corrputed file system I
found two other cases were btrfs crashes:
- btrfs_del_items() was overlooked by me
- deleting from an empty node
Find attached two patches to improve that.
Please check the second patch hunk 2, as I'm unsure if
On Fri, Jun 2, 2017 at 4:09 AM, Yan, Zheng wrote:
> On Fri, Jun 2, 2017 at 8:57 AM, Deepa Dinamani wrote:
>> On Thu, Jun 1, 2017 at 5:36 PM, John Stultz wrote:
>>> On Thu, Jun 1, 2017 at 5:26 PM, Yan, Zheng
On 2.06.2017 11:23, Omar Sandoval wrote:
> From: Omar Sandoval
>
> This is a regression test for "[PATCH] Btrfs: fix delalloc accounting
> leak caused by u32 overflow". It creates a bunch of delalloc extents and
> merges them together to make sure the accounting is done right.
From: Omar Sandoval
This is a regression test for "[PATCH] Btrfs: fix delalloc accounting
leak caused by u32 overflow". It creates a bunch of delalloc extents and
merges them together to make sure the accounting is done right.
Signed-off-by: Omar Sandoval
---
From: Omar Sandoval
btrfs_calc_trans_metadata_size() does an unsigned 32-bit multiplication,
which can overflow if num_items >= 4 GB / (nodesize * BTRFS_MAX_LEVEL * 2).
For a nodesize of 16kB, this overflow happens at 16k items. Usually,
num_items is a small constant passed to
bio_io_error was introduced in the commit 4246a0b
("block: add a bi_error field to struct bio"), so
use it to simplify code.
Signed-off-by: Guoqing Jiang
---
fs/btrfs/inode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/btrfs/inode.c
On 04/07/2017 05:57 PM, Deepa Dinamani wrote:
> CURRENT_TIME macro is not y2038 safe on 32 bit systems.
>
> The patch replaces all the uses of CURRENT_TIME by
> current_time().
>
> This is also in preparation for the patch that transitions
> vfs timestamps to use 64 bit time and hence make them
38 matches
Mail list logo