Support for a new command 'btrfs dev forget [dev]' is proposed here,
to undo the effects of 'btrfs dev scan [dev]'. For this purpose,
this patch proposes to use ioctl #5 as it was empty.
IOW(BTRFS_IOCTL_MAGIC, 5, ..)
This patch adds new ioctl BTRFS_IOC_FORGET_DEV which can be sent from
the
On 2018年01月10日 22:28, David Sterba wrote:
> I've noticed that the updated item checker stack consumption increased
> dramatically in 542f5385e20cf97447 ("btrfs: tree-checker: Add checker
> for dir item")
>
> tree-checker.c:check_leaf+552 (176 -> 728)
>
> The array is 255
Support in-kernel fault-injection framework via debugfs.
This allows you to inject a conditional error to specified
function using debugfs interfaces.
Here is the result of test script described in
Documentation/fault-injection/fault-injection.txt
===
# ./test_fail_function.sh
1+0
Add injectable error types for each error-injectable function.
One motivation of error injection test is to find software flaws,
mistakes or mis-handlings of expectable errors. If we find such
flaws by the test, that is a program bug, so we need to fix it.
But if the tester miss input the error
Since error-injection framework is not limited to be used
by kprobes, nor bpf. Other kernel subsystems can use it
freely for checking safeness of error-injection, e.g.
livepatch, ftrace etc.
So this separate error-injection framework from kprobes.
Some differences has been made:
- "kprobe" word
Compare instruction pointer with original one on the
stack instead using per-cpu bpf_kprobe_override flag.
This patch also consolidates reset_current_kprobe() and
preempt_enable_no_resched() blocks. Those can be done
in one place.
Signed-off-by: Masami Hiramatsu
Check whether error injectable event is on function entry or not.
Currently it checks the event is ftrace-based kprobes or not,
but that is wrong. It should check if the event is on the entry
of target function. Since error injection will override a function
to just return with modified return
Hi,
Here are the 4th version of patches to moving error injection
table from kprobes. This series changes error-injection.h
including points for ALLOW_ERROR_INJECTION macro and add
Reviewed-by from Josef Bacik (except [3/5]).
Here is the previous version:
Instead of pointer to btrfs_fs_devices as an arg in device_list_add()
better to get pointer to btrfs_device as return value, then we have
both, pointer to btrfs_device and btrfs_fs_devices. btrfs_device is
needed to handle reappearing missing device.
Signed-off-by: Anand Jain
(Apply on top of my patchset
[PATCH v4 0/6] preparatory work to add device forget
for conflict free apply. They don't actually depend on
each other though).
v3->v4:
@3/4: Just return device instead of PTR_ERR(ERR_PTR(device));
v2->v3:
Fix device_list_add() fn description which was still
There is no other parent for device_list_add() except for
btrfs_scan_one_device(), which would set btrfs_fs_devices::total_devices
if device_list_add is successful and this can be done with in
device_list_add() itself.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
As struct btrfs_disk_super is being passed, so it can get devid
the same way its parent does.
Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
---
fs/btrfs/volumes.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git
Commit 60999ca4b403 ("btrfs: make device scan less noisy")
adds return value 1 to device_list_add(), so that parent function can
call pr_info only when new device is added. Move the pr_info() part
into device_list_add() so that this function can be kept simple.
Signed-off-by: Anand Jain
On Wed, 10 Jan 2018 10:36:15 -0500
Josef Bacik wrote:
> On Wed, Jan 10, 2018 at 07:18:05PM +0900, Masami Hiramatsu wrote:
> > Since error-injection framework is not limited to be used
> > by kprobes, nor bpf. Other kernel subsystems can use it
> > freely for checking
Austin S. Hemmelgarn wrote:
So, for a while now I've been recommending small filtered balances to
people as part of regular maintenance for BTRFS filesystems under the
logic that it does help in some cases and can't really hurt (and if done
right, is really inexpensive in terms of resources).
2018-01-10 21:33 GMT+03:00 Tom Worster :
> On 10 Jan 2018, at 12:01, Austin S. Hemmelgarn wrote:
>
>> On 2018-01-10 11:30, Tom Worster wrote:
>>
>> Also, for future reference, the term we typically use is ENOSPC, as that's
>> the symbolic name for the error code you get when this
On 10 Jan 2018, at 12:01, Austin S. Hemmelgarn wrote:
On 2018-01-10 11:30, Tom Worster wrote:
Also, for future reference, the term we typically use is ENOSPC, as
that's the symbolic name for the error code you get when this happens
(or when your filesystem is just normally full), but I
On 2018-01-10 11:30, Tom Worster wrote:
On 9 Jan 2018, at 22:49, Duncan wrote:
AFAIK, such corruption reports re balance aren't really balance, per se,
at all.
Instead, what I've seen in nearly all cases is a number of filesystem
maintenance commands involving heavy I/O colliding, that is,
From: Josef Bacik
My delayed refs rsv patches uncovered a problem in
btrfs_alloc_data_chunk_ondemand where we don't clear ret before
returning, so we could have whatever left over value we had from trying
to do a chunk allocation or whatever that may have failed. Since we
know
Commit 3558d4f88ec8 ("btrfs: Deprecate userspace transaction ioctls")
marked the beginning of the end of userspace transaction. This commit
finishes the job!
Signed-off-by: Nikolay Borisov
---
fs/btrfs/ctree.h | 1 -
fs/btrfs/file.c | 6
fs/btrfs/ioctl.c | 95
Since userspace transaction have been removed we no longer have use
for this field so delete it.
Signed-off-by: Nikolay Borisov
---
fs/btrfs/ctree.h | 1 -
fs/btrfs/extent-tree.c | 3 +--
fs/btrfs/transaction.c | 9 +++--
3 files changed, 4 insertions(+), 9
Now that the userspace transaction ioctls have been removed,
TRANS_USERSPACE is no longer used hence we can remove it.
Signed-off-by: Nikolay Borisov
---
fs/btrfs/transaction.c | 27 ++-
fs/btrfs/transaction.h | 5 +
2 files changed, 7
Since we no longer support userspace transaction there is no need to
keep this member variable, so remove it.
Signed-off-by: Nikolay Borisov
---
fs/btrfs/ctree.h | 1 -
fs/btrfs/file.c | 2 --
2 files changed, 3 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
On 9 Jan 2018, at 22:49, Duncan wrote:
AFAIK, such corruption reports re balance aren't really balance, per
se,
at all.
Instead, what I've seen in nearly all cases is a number of filesystem
maintenance commands involving heavy I/O colliding, that is, being run
at
the same time
I hope
On Wed, Jan 10, 2018 at 03:21:13PM +0200, Nikolay Borisov wrote:
> Userspace transaction were initially added to he benefit of Ceph, however
> in recent times it became clear that btrfs is not suitable for Ceph's workload
> and has even been actively discoured. Additionaly, the userspace
On Wed, Jan 10, 2018 at 09:30:06AM +0800, Qu Wenruo wrote:
>
>
> On 2018年01月10日 00:04, Nikolay Borisov wrote:
> > Currently when df (resp. statfs) is executed on a btrfs instance the
> > free space is calculated as the freespace of the block groups +
> > any unallocated space on the devices,
On Wed, Jan 10, 2018 at 01:15:23PM +0800, Anand Jain wrote:
> From: Anand Jain
>
> The btrfs_free_stale_device() is updated to match for the given
> device path and delete it. (It searches for only unmounted list of
> devices.) Also drop the comment about different path
On Wed, Jan 10, 2018 at 01:15:22PM +0800, Anand Jain wrote:
> No functional changes.
> Rename btrfs_free_stale_devices() arg to skip_dev, so that it
> reflects what that arg for.
>
> Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
Thanks,
Josef
--
To
On Wed, Jan 10, 2018 at 03:21:13PM +0200, Nikolay Borisov wrote:
> Userspace transaction were initially added to he benefit of Ceph, however
> in recent times it became clear that btrfs is not suitable for Ceph's workload
> and has even been actively discoured. Additionaly, the userspace
On Wed, Jan 10, 2018 at 01:15:21PM +0800, Anand Jain wrote:
> From: Anand Jain
>
> This updates btrfs_free_stale_device() helper function to delete all
> unmouted devices, when arg is NULL.
>
> Signed-off-by: Anand Jain
Reviewed-by: Josef Bacik
On Wed, Jan 10, 2018 at 01:15:20PM +0800, Anand Jain wrote:
> From: Anand Jain
>
> Let the list iterator iterate further and find other stale
> devices and delete it. This is in preparation to add support
> for user land request-able stale devices cleanup. Also rename
>
On Wed, Jan 10, 2018 at 03:28:51PM +0100, David Sterba wrote:
> I've noticed that the updated item checker stack consumption increased
> dramatically in 542f5385e20cf97447 ("btrfs: tree-checker: Add checker
> for dir item")
>
> tree-checker.c:check_leaf+552 (176 -> 728)
>
>
On Wed, Jan 10, 2018 at 07:19:05PM +0900, Masami Hiramatsu wrote:
> Support in-kernel fault-injection framework via debugfs.
> This allows you to inject a conditional error to specified
> function using debugfs interfaces.
>
> Here is the result of test script described in
>
On Wed, Jan 10, 2018 at 07:18:35PM +0900, Masami Hiramatsu wrote:
> Add injectable error types for each error-injectable function.
>
> One motivation of error injection test is to find software flaws,
> mistakes or mis-handlings of expectable errors. If we find such
> flaws by the test, that is a
On Wed, Jan 10, 2018 at 07:18:05PM +0900, Masami Hiramatsu wrote:
> Since error-injection framework is not limited to be used
> by kprobes, nor bpf. Other kernel subsystems can use it
> freely for checking safeness of error-injection, e.g.
> livepatch, ftrace etc.
> So this separate
On 10.01.2018 03:30, Qu Wenruo wrote:
> That system chunk can be relocated by balance, and in that case new
> chunk may start beyond 1M.
>
> So the most reliable method would be manually checking the the first
> device extent of this device, and to determine if we should minus that 1M.
>
> If
On Wed, Jan 10, 2018 at 07:17:35PM +0900, Masami Hiramatsu wrote:
> Compare instruction pointer with original one on the
> stack instead using per-cpu bpf_kprobe_override flag.
>
> This patch also consolidates reset_current_kprobe() and
> preempt_enable_no_resched() blocks. Those can be done
> in
On Wed, Jan 10, 2018 at 07:17:06PM +0900, Masami Hiramatsu wrote:
> Check whether error injectable event is on function entry or not.
> Currently it checks the event is ftrace-based kprobes or not,
> but that is wrong. It should check if the event is on the entry
> of target function. Since error
I've noticed that the updated item checker stack consumption increased
dramatically in 542f5385e20cf97447 ("btrfs: tree-checker: Add checker
for dir item")
tree-checker.c:check_leaf+552 (176 -> 728)
The array is 255 bytes long, dynamic allocation would slow down the
sanity
On 2018年01月10日 22:14, Nikolay Borisov wrote:
>
>
> On 10.01.2018 06:56, Qu Wenruo wrote:
>> When creating btrfs, mkfs.btrfs will firstly create a temporary system
>> chunk as basis, and then created needed trees or new devices.
>>
>> However the layout temporary system chunk is hard-coded and
On 10.01.2018 06:56, Qu Wenruo wrote:
> When creating btrfs, mkfs.btrfs will firstly create a temporary system
> chunk as basis, and then created needed trees or new devices.
>
> However the layout temporary system chunk is hard-coded and uses
> reserved [0, 1M) range of devid 1.
>
> Change
On Tue, Jan 9, 2018 at 3:10 PM, Jeff Layton wrote:
> From: Jeff Layton
>
> Since i_version is mostly treated as an opaque value, we can exploit that
> fact to avoid incrementing it when no one is watching. With that change,
> we can avoid incrementing the
Commit 3558d4f88ec8 ("btrfs: Deprecate userspace transaction ioctls")
marked the beginning of the end of userspace transaction. This commit
finishes the job!
Signed-off-by: Nikolay Borisov
---
V3:
Remove btrfs_ioctl_trans_end declaration in ctree.h
V2:
Remove
Commit 3558d4f88ec8 ("btrfs: Deprecate userspace transaction ioctls")
marked the beginning of the end of userspace transaction. This commit
finishes the job!
Signed-off-by: Nikolay Borisov
---
V2:
Remove btrfs_ioctl_trans_end reference in btrfs_sync_fil
fs/btrfs/file.c |
@@ -742,7 +741,7 @@ static noinline int device_list_add(const char *path,
if (!fs_devices) {
fs_devices = alloc_fs_devices(disk_super->fsid);
if (IS_ERR(fs_devices))
- return PTR_ERR(fs_devices);
+ return
Userspace transaction were initially added to he benefit of Ceph, however
in recent times it became clear that btrfs is not suitable for Ceph's workload
and has even been actively discoured. Additionaly, the userspace transaction
mechanism has always been a sort of a hack, which could easily lead
Now that the userspace transaction ioctls have been removed,
TRANS_USERSPACE is no longer used hence we can remove it.
---
fs/btrfs/transaction.c | 27 ++-
fs/btrfs/transaction.h | 5 +
2 files changed, 7 insertions(+), 25 deletions(-)
diff --git
Since we no longer support userspace transaction there is no need to
keep this member variable, so remove it.
---
fs/btrfs/ctree.h | 1 -
fs/btrfs/file.c | 2 --
2 files changed, 3 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 1a462ab85c49..a3911d86bab9 100644
---
Commit 3558d4f88ec8 ("btrfs: Deprecate userspace transaction ioctls")
marked the beginning of the end of userspace transaction. This commit
finishes the job!
---
fs/btrfs/ioctl.c | 95
1 file changed, 95 deletions(-)
diff --git
Since userspace transaction have been removed we no longer have use
for this field so delete it.
---
fs/btrfs/ctree.h | 1 -
fs/btrfs/extent-tree.c | 3 +--
fs/btrfs/transaction.c | 9 +++--
3 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/ctree.h
Since error-injection framework is not limited to be used
by kprobes, nor bpf. Other kernel subsystems can use it
freely for checking safeness of error-injection, e.g.
livepatch, ftrace etc.
So this separate error-injection framework from kprobes.
Some differences has been made:
- "kprobe" word
Add injectable error types for each error-injectable function.
One motivation of error injection test is to find software flaws,
mistakes or mis-handlings of expectable errors. If we find such
flaws by the test, that is a program bug, so we need to fix it.
But if the tester miss input the error
Support in-kernel fault-injection framework via debugfs.
This allows you to inject a conditional error to specified
function using debugfs interfaces.
Here is the result of test script described in
Documentation/fault-injection/fault-injection.txt
===
# ./test_fail_function.sh
1+0
Check whether error injectable event is on function entry or not.
Currently it checks the event is ftrace-based kprobes or not,
but that is wrong. It should check if the event is on the entry
of target function. Since error injection will override a function
to just return with modified return
Hi,
Here are the 3rd version of patches to moving error injection
table from kprobes. This series includes some fixes and error
type descriptions which we discussed in the previous thread.
Here is the previous version:
https://lkml.org/lkml/2017/12/26/26
There are 2 main reasons why I separate
On 10.01.2018 06:56, Qu Wenruo wrote:
> Signed-off-by: Qu Wenruo
Reviewed-by: Nikolay Borisov
> ---
> .../mkfs-tests/010-reserved-1M-for-single/test.sh | 37
> ++
> 1 file changed, 37 insertions(+)
> create mode 100755
On 10.01.2018 07:16, Anand Jain wrote:
> Instead of pointer to btrfs_fs_devices as an arg in device_list_add()
> better to get pointer to btrfs_device as return value, then we have
> both, pointer to btrfs_device and btrfs_fs_devices. btrfs_device is
> needed to handle reappearing missing
On 10.01.2018 06:56, Qu Wenruo wrote:
> When creating btrfs, mkfs.btrfs will firstly create a temporary system
> chunk as basis, and then created needed trees or new devices.
>
> However the layout temporary system chunk is hard-coded and uses
> reserved [0, 1M) range of devid 1.
>
> Change
101 - 158 of 158 matches
Mail list logo