On 2018年03月28日 13:04, Amir Goldstein wrote:
> On Wed, Mar 28, 2018 at 7:40 AM, Qu Wenruo wrote:
>> Basic test case which triggers fsstress with dm-log-writes, and then
>> check the fs after each FUA writes.
>> With needed infrastructure and special handlers for journal based fs.
On Wed, Mar 28, 2018 at 7:40 AM, Qu Wenruo wrote:
> Basic test case which triggers fsstress with dm-log-writes, and then
> check the fs after each FUA writes.
> With needed infrastructure and special handlers for journal based fs.
>
> Signed-off-by: Qu Wenruo
> ---
Signed-off-by: Qu Wenruo
Reviewed-by: Amir Goldstein
---
changelog:
v2:
Add Amir's reviewed-by tag.
---
src/log-writes/log-writes.c | 3 ++-
src/log-writes/log-writes.h | 9 +
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git
Also change the flag numeric output to hex.
Signed-off-by: Qu Wenruo
Reviewed-by: Amir Goldstein
---
changelog:
v2:
Add Amir's reviewed-by tag.
---
src/log-writes/log-writes.c | 70 -
1 file changed, 63
Basic test case which triggers fsstress with dm-log-writes, and then
check the fs after each FUA writes.
With needed infrastructure and special handlers for journal based fs.
Signed-off-by: Qu Wenruo
---
changelog:
v2:
Use proper "SUSE Linux Products GmbH" instead of "SuSE"
On Mon, Mar 26, 2018 at 11:59:21PM +0100, fdman...@kernel.org wrote:
> From: Filipe Manana
>
> Test that when we have the no-holes mode enabled and a specific metadata
> layout, if we punch a hole and fsync the file, at replay time the whole
> hole was preserved.
>
> This
On 2018/03/27 21:39, Nikolay Borisov wrote:
>
>
> On 26.03.2018 11:30, Misono Tomohiro wrote:
>> This patch changes the behavior of rmdir(2) to allow it to delete
>> an empty subvolume by default, unless it is not a default subvolume
>> and send is not in progress.
>>
>> New function
On 2018/03/26 17:51, Nikolay Borisov wrote:
>
>
> On 26.03.2018 11:28, Misono Tomohiro wrote:
>> This is a preparation work to allow rmdir(2) to delete a subvolume.
>>
>> Signed-off-by: Tomohiro Misono
>> ---
>> fs/btrfs/ctree.h | 1 +
>> fs/btrfs/inode.c | 54
current devel branch of btrfs-progs (github) occasionally fails at misc-test
006:
(kernel is 4.16.0-rc7)
==
$ sudo make test-misc TEST=006\*
[LD] fssum
[TEST] misc-tests.sh
[TEST/misc] 006-image-on-missing-device
/usr/data/src/btrfs-progs/tests//common: line 177: 10819
During the btrfs dev scan make sure that other copies of superblock
contain the same fsid as the primary SB. So that we bring to the
user notice if the superblock has been overwritten.
mkfs.btrfs -fq /dev/sdc
mkfs.btrfs -fq /dev/sdb
dd if=/dev/sdb of=/dev/sdc count=4K skip=64K seek=64K obs=1
During the mount context btrfs_open_devices() calls invalidate_bdev()
for all the devices. So drop the invalidate_bdev() in open_ctree()
which is only for the btrfs_fs_devices::latest_bdev.
The call trace is as shown below.
btrfs_mount_root()
|
|_btrfs_parse_early_options (-o device only)
|
The only caller btrfs_scan_one_device() sets -EINVAL for error from
btrfs_read_disk_super(), so this patch returns -EINVAL from the latter
function.
A preparatory patch to add csum check in btrfs_read_disk_super().
Signed-off-by: Anand Jain
---
v1->v2:
Check
During the mkfs.btrfs -b btrfs_prepare_device() zeros all
the superblock bytenr locations only if the bytenr is below the
blockcount. The problem with this is that if the BTRFS is recreated
with a smaller size then we will leave the stale superblock in the disk
which shall confuse the recovery.
During the scan context, we aren't verifying the superblock-
checksum when read.
This patch fixes it by adding the checksum verification function
btrfs_check_super_csum() in the function btrfs_read_disk_super().
And makes device scan to error fail if the primary superblock csum
is wrong, whereas
Return the required -EINVAL and -EUCLEAN from the function
btrfs_check_super_csum(). And more the error log into the
parent function.
Signed-off-by: Anand Jain
---
v1->v2:
Fix commit indent reported by checkpatch.pl
Fix pr_err split string
fs/btrfs/disk-io.c | 25
During mount context, we aren't verifying the superblock checksum
for all the devices, instead, we verify it only for the
struct btrfs_fs_device::latest_bdev. This patch fixes it by moving
the checksum verification code from the function open_ctree() into
the function btrfs_read_dev_one_super().
v1->v2:
Various changes suggested by Nicokay. Thanks. For specific changes
pls ref to the patch.
Patch 1-4/8 are preparatory patches adds cleanups and nonstatic requisites.
Patch 5/8 makes sure that all copies of the superblock have the same fsid
when we scan the device.
Patch 6/8 verifies
In preparation to add the superblock csum verification for the
scan context, make btrfs_check_super_csum() non-static.
Signed-off-by: Anand Jain
Reviewed-by: Nikolay Borisov
---
fs/btrfs/disk-io.c | 2 +-
fs/btrfs/disk-io.h | 1 +
2 files changed, 2
We check the %csum_type twice. Drop one. Check for the csum_type and
then for the csum. Which also matches with the progs which have better
logic. This is preparatory patch to get proper error code from
btrfs_check_super_csum().
Signed-off-by: Anand Jain
Reviewed-by:
On 03/27/2018 02:19 PM, Nikolay Borisov wrote:
On 27.03.2018 02:50, Anand Jain wrote:
I told you this code can be made a lot simpler, simply by modifying the
last argument passed to zero_dev_clamped. I even posted the resulting
diff which was just 3 lines changed.
I agree that it's a
Test script:
Corrupt primary superblock and check if device scan and mount
fails:
mkfs.btrfs -fq /dev/sdc
dd if=/dev/urandom of=/dev/sdc ibs=1 obs=1 count=1 seek=64K
btrfs dev scan
mount /dev/sdb /btrfs
Corrupt secondary superblock and check if device scan and mount
is
On 03/27/2018 08:21 PM, Nikolay Borisov wrote:
On 26.03.2018 11:27, Anand Jain wrote:
During mount context, we aren't verifying the superblock checksum
for all the devices, instead, we verify it only for the
struct btrfs_fs_device::latest_bdev. This patch fixes it
by moving the checksum
On 03/27/2018 04:49 PM, Nikolay Borisov wrote:
On 26.03.2018 11:27, Anand Jain wrote:
During the btrfs dev scan make sure that other copies of superblock
contain the same fsid as the primary SB. So that we bring to the
user notice if the superblock has been overwritten.
mkfs.btrfs -fq
On 03/28/2018 03:16 AM, David Sterba wrote:
On Tue, Mar 27, 2018 at 11:05:53AM +0300, Nikolay Borisov wrote:
+ if (err) {
+ if (err == -EINVAL)
+ pr_err("BTRFS error (device %pg): "\
+ "unsupported checksum algorithm",
+
--
Greeting, once again is me Lucy Boston this is twice am contacting you
please is very urgent respond to me for more details through my.
Email:
dr.lucybos...@gmail.com
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to
On 03/28/2018 02:48 AM, David Sterba wrote:
The show_devname callback is used to print device name in
/proc/self/mounts, we need to traverse the device list consistently and
read the name that's copied to a seq buffer so we don't need further
locking.
If the first device is being deleted at
On Tue, Mar 27, 2018 at 11:05:53AM +0300, Nikolay Borisov wrote:
> > + if (err) {
> > + if (err == -EINVAL)
> > + pr_err("BTRFS error (device %pg): "\
> > + "unsupported checksum algorithm",
> > +
On Wed, Mar 21, 2018 at 10:45:04AM +0200, Nikolay Borisov wrote:
> This patchkit aims to simplify and streamline the logic involved in
> initialising and adding delayed refs/delayed head structures which deal with
> modification of the extent tree. Currently the logic for init and add was
>
The show_devname callback is used to print device name in
/proc/self/mounts, we need to traverse the device list consistently and
read the name that's copied to a seq buffer so we don't need further
locking.
If the first device is being deleted at the same time, the RCU will
allow us to read the
The current calls are unclear in what way btrfs_dev_replace_lock takes
the locks, so drop the argument, split the helpers and use similar
naming as for read and write locks.
Signed-off-by: David Sterba
---
fs/btrfs/dev-replace.c | 98
The fs_mutex has been killed in 2008, a213501153fd66e2 ("Btrfs: Replace
the big fs_mutex with a collection of other locks"), still remembered in
some comments.
We don't have any extra needs for locking in the ACL handlers.
Signed-off-by: David Sterba
---
fs/btrfs/acl.c | 8
Once there was a simple int force_cow that was used with the plain
barriers, and then converted to a bit, so we should use the appropriate
barrier helper.
Other variables in the complex if condition do not depend on a barrier,
so we should be fine in case the atomic barrier becomes a no-op.
Using lockdep_assert_held is preferred, replace mutex_is_locked.
Signed-off-by: David Sterba
---
fs/btrfs/extent-tree.c | 2 +-
fs/btrfs/scrub.c | 4 ++--
fs/btrfs/volumes.c | 10 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git
Using lockdep_assert_held is preferred, replace assert_spin_locked.
Signed-off-by: David Sterba
---
fs/btrfs/delayed-ref.c | 6 +++---
fs/btrfs/qgroup.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
A few cleanups related to lockdep and locking. The btrfs_show_devname is
a functional change, uses the same mechanism as btrfs_ioctl_dev_info or
btrfs_ioctl_fs_info so that's not a new thing.
David Sterba (6):
btrfs: use lockdep_assert_held for spinlocks
btrfs: use lockdep_assert_held for
On Tue, Mar 27, 2018 at 4:23 PM, David Sterba wrote:
> On Tue, Mar 27, 2018 at 07:49:02AM +0800, Qu Wenruo wrote:
>> > Merging plan for this patchset from last week was to postpone until
>> > 4.18 due to lack of final testing here. I've tried to run this with
>> > quotas enabled
The missing error handling in add_extent_changeset was hidden, so make
it at least visible in the callers.
Signed-off-by: David Sterba
---
fs/btrfs/extent_io.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs/extent_io.c
On Wed, Mar 07, 2018 at 04:20:17PM +0800, robbieko wrote:
> From: Robbie Ko
>
> This patchset intends to fix btrfs fiemap related bug.
>
> The fiemap has the following problems:
>
> 1) Wrong extent count when fm_extent_count is zero.
>
>
> 2) SHARED bit is not correct
On Tue, Mar 27, 2018 at 07:49:02AM +0800, Qu Wenruo wrote:
> > Merging plan for this patchset from last week was to postpone until
> > 4.18 due to lack of final testing here. I've tried to run this with
> > quotas enabled an fstests that led to warnings in the power failure
> > simulation tests.
>
We have several reports about node pointer points to incorrect child
tree blocks, which could have even wrong owner and level but still with
valid generation and checksum.
Although btrfs check could handle it and print error message like:
leaf parent key incorrect 60670574592
Kernel doesn't have
The extent tree of the test fs is like the following:
BTRFS info (device (null)): leaf 16327509003777336587 total ptrs 1 free space
3919
item 0 key (4096 168 4096) itemoff 3944 itemsize 51
extent refs 1 gen 1 flags 2
tree block key (68719476736 0 0) level 1
On 26.03.2018 11:30, Misono Tomohiro wrote:
> This patch changes the behavior of rmdir(2) to allow it to delete
> an empty subvolume by default, unless it is not a default subvolume
> and send is not in progress.
>
> New function btrfs_delete_subvolume() is almost equal to the second half
> of
On 26.03.2018 11:27, Anand Jain wrote:
> During mount context, we aren't verifying the superblock checksum
> for all the devices, instead, we verify it only for the
> struct btrfs_fs_device::latest_bdev. This patch fixes it
> by moving the checksum verification code from the function
On Mon, Mar 26, 2018 at 10:00:04AM -0500, Ashu Tiwary wrote:
> It appears my system may have hit the issue reverted here (
> https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg74621.html
> ) ( [PATCH] Revert "btrfs: use proper endianness accessors for
> super_copy" ); system is an IBM
On 26.03.2018 11:27, Anand Jain wrote:
> In preparation to add the superblock csum verification for the
> scan context, make btrfs_check_super_csum() non-static.
>
> Signed-off-by: Anand Jain
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/disk-io.c
On 27.03.2018 14:30, Nikolay Borisov wrote:
>
>
> On 26.03.2018 11:27, Anand Jain wrote:
>> During the scan context, we aren't verifying the superblock-
>> checksum when read.
>> This patch fixes it by adding the checksum verification function
>> btrfs_check_super_csum() in the function
On 26.03.2018 11:27, Anand Jain wrote:
> We check the %csum_type twice. Drop one. Check for the csum_type and
> then for the csum. Which also matches with the progs which have better
> logic. This is preparatory patch to get proper error code from
> btrfs_check_super_csum().
>
> Signed-off-by:
On 26.03.2018 11:27, Anand Jain wrote:
> During the scan context, we aren't verifying the superblock-
> checksum when read.
> This patch fixes it by adding the checksum verification function
> btrfs_check_super_csum() in the function btrfs_read_disk_super().
> And makes device scan to error fail
On 26.03.2018 11:27, Anand Jain wrote:
> During the btrfs dev scan make sure that other copies of superblock
> contain the same fsid as the primary SB. So that we bring to the
> user notice if the superblock has been overwritten.
>
> mkfs.btrfs -fq /dev/sdc
> mkfs.btrfs -fq /dev/sdb
> dd
From: Filipe Manana
Test that when we have the no-holes mode enabled and a specific metadata
layout, if we punch a hole and fsync the file, at replay time the whole
hole was preserved.
This issue is fixed by the following btrfs patch for the linux kernel:
"Btrfs: fix fsync
From: Filipe Manana
When logging an inode, at tree-log.c:copy_items(), if we call
btrfs_next_leaf() at the loop which checks for the need to log holes, we
need to make sure copy_items() returns the value 1 to its caller and
not 0 (on success). This is because the path the
From: Filipe Manana
When we have the no-holes mode enabled and fsync a file after punching a
hole in it, we can end up not logging the whole hole range in the log tree.
This happens if the file has extent items that span more than one leaf and
we punch a hole that covers a
On 26.03.2018 11:27, Anand Jain wrote:
> The only caller btrfs_scan_one_device() sets -EINVAL for error from
> btrfs_read_disk_super(), so this patch returns -EINVAL from the latter
> function.
>
> A preparatory patch to add csum check in btrfs_read_disk_super().
>
> Signed-off-by: Anand Jain
On 26.03.2018 11:27, Anand Jain wrote:
> Return the required -EINVAL and -EUCLEAN from the function
> btrfs_check_super_csum(). And more the error log into the
> parent function.
>
> Signed-off-by: Anand Jain
> ---
> fs/btrfs/disk-io.c | 27 ---
>
On 27.03.2018 09:04, Qu Wenruo wrote:
> In print-tree, we have a lot of parsers to convert numeric flags to
> human readable string.
>
> For the buffer size we're using immediate numbers for all their callers.
> Change this to macro so it will be much easier for us to expand the
> buffer size.
There is already a replacement in the face of btrfs inspect-internal
dump-tree. And this command is just a simple wrapper around it. Just
remove it and adjust the show-blocks script to call the main btrfs
binary to achieve the same effect.
Signed-off-by: Nikolay Borisov
---
Its function has been superseded by btrfs inspect-internal show-super.
Furthermore the tools is currently not built by default. Just remove
it.
Signed-off-by: Nikolay Borisov
---
.gitignore| 1 -
Documentation/Makefile.in | 1
Its function has been superseded by btrfs inspect-internal tree-stats.
Just remove it.
Signed-off-by: Nikolay Borisov
---
.gitignore| 1 -
Makefile | 2 +-
btrfs-calc-size.c | 39 ---
3 files changed, 1 insertion(+), 41
Its function has been subsumed by "btrfs rescue zero-log". Remove its
source file and adjust make/tests soruces accordingly.
Signed-off-by: Nikolay Borisov
---
.gitignore| 1 -
Documentation/Makefile.in | 1 -
On 03/27/2018 03:19 PM, 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 check the parameter are find_inode_ref and check_inode_item, the
are only
This parameter is no longer used in this function, so drop it
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index a8a2f76549a2..2c7b270a3ffa 100644
---
We can derive this argument from root->fs_info and also make it local
to the sole switch case it's used.
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/check/mode-lowmem.c
All real consumers of that variable have inlined the checks since they
are simple enough. So just remove it.
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index
It's no longer used in the function so just remove it
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index e26e9bdf3bb3..34519f30a4aa 100644
---
This is a boolean parameter which signals whether the fs has the
EXTENDED_IREF feature flag toggled or not. Since a reference to fs_info
can be obtained there is no need to pollute the interface.
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 13 ++---
1
It's no longer used in that function so can be dropped altogether.
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index
It's no longer use and can be dropped.
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index 34519f30a4aa..29c55e202f2b 100644
--- a/check/mode-lowmem.c
First this function does the '!!' trick to turn its value into a bool,
yet the return type is int. Second, the kernel counterpart also returns
bool.
Signed-off-by: Nikolay Borisov
---
ctree.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ctree.h
It's no longer used so just remove it.
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index 29c55e202f2b..76365a214e34 100644
--- a/check/mode-lowmem.c
The testcase checks the functionality of "btrfs rescue undelete-subvol",
including recovering an intact subvolume, and handling correctly
incomplete subvolume.
Signed-off-by: Lu Fengqi
---
v2: add shell quoting to test script.
The function is used to determine whether the subvolume is intact.
Signed-off-by: Lu Fengqi
---
Makefile | 3 ++-
undelete-subvol.c | 53 +
undelete-subvol.h | 17 +
3 files changed, 72
Since we have an existing function to find free inode index, we can
reuse it here.
Signed-off-by: Lu Fengqi
---
inode.c | 27 +++
1 file changed, 7 insertions(+), 20 deletions(-)
diff --git a/inode.c b/inode.c
index 478036562652..86905365dfd8
Add btrfs_del_orphan_item for the later subvolume undelete.
Signed-off-by: Lu Fengqi
---
ctree.h | 2 ++
inode.c | 30 ++
2 files changed, 32 insertions(+)
diff --git a/ctree.h b/ctree.h
index fa861ba0b4c3..0fc31dd8d998 100644
---
Add the undelete-subvol subcommand for btrfs rescue. This subcommand is
used to recover deleted subvolume left intact on the device.
Signed-off-by: Lu Fengqi
---
v2: add -s option to specify subvol_id.
cmds-rescue.c | 70
The function will create lost+found directory, link the deleted
subvolume specified by the subvol_id to the directory, update the
information of root_item and cleanup the associated orphan item.
Signed-off-by: Lu Fengqi
---
undelete-subvol.c | 76
The function default will traverse the all orphan items on the tree root,
and recover the all intact subvolumes. If subvol_id is specified, then only
the corresponding subvolume will be recovered.
Signed-off-by: Lu Fengqi
---
v2: add subvol_id argumenta to specify
The original btrfs_mksubvol is too specific to specify the directory that
the subvolume will link to. Furthermore, in this transaction, we don't only
need to create root_ref/dir-item, but also update the refs or flags of
root_item. Extract a generic btrfs_link_subvol that allow the caller pass a
The function will find the root_item specified by the subvol_id,
clear the BTRFS_ROOT_SUBVOL_DEAD flag and set root_refs to one.
Signed-off-by: Lu Fengqi
---
ctree.h | 1 +
undelete-subvol.c | 55 +++
2
This patchset will add undelete-subvol subcommand for btrfs rescue. This
enhancement allows undeleting a subvolume on an unmounted filesystem.
Patchset can be fetched from github:
https://github.com/littleroad/btrfs-progs.git undelete
v1->v2: add -s option to allow user specify the subvolume
--
Goede dag,
We zijn Funding Trusts Finance verstrekt leningen per postadvertentie. Wij
bieden verschillende soorten leningen of projectleningen (korte en lange
termijnleningen, persoonlijke leningen, leningen aan bedrijven enz.) Met een
rentetarief van 3%. We verstrekken
--
Goede dag,
We zijn Funding Trusts Finance verstrekt leningen per postadvertentie. Wij
bieden verschillende soorten leningen of projectleningen (korte en lange
termijnleningen, persoonlijke leningen, leningen aan bedrijven enz.) Met een
rentetarief van 3%. We verstrekken
--
Goede dag,
We zijn Funding Trusts Finance verstrekt leningen per postadvertentie. Wij
bieden verschillende soorten leningen of projectleningen (korte en lange
termijnleningen, persoonlijke leningen, leningen aan bedrijven enz.) Met een
rentetarief van 3%. We verstrekken
On 27.03.2018 02:50, Anand Jain wrote:
>
>
>> I told you this code can be made a lot simpler, simply by modifying the
>> last argument passed to zero_dev_clamped. I even posted the resulting
>> diff which was just 3 lines changed.
>>
>> I agree that it's a good idea to wipe all available
In print-tree, we have a lot of parsers to convert numeric flags to
human readable string.
For the buffer size we're using immediate numbers for all their callers.
Change this to macro so it will be much easier for us to expand the
buffer size.
Signed-off-by: Qu Wenruo
---
84 matches
Mail list logo