Add unprivileged version of ino_lookup ioctl BTRFS_IOC_INO_LOOKUP_USER
to allow normal users to call "btrfs subvolume list/show" etc. in
combination with BTRFS_IOC_GET_SUBVOL_INFO/BTRFS_IOC_GET_SUBVOL_ROOTREF.
This can be used like BTRFS_IOC_INO_LOOKUP but the argument is
different. This is
Thanks for the reporting.
I will update the patch.
Regards,
Tomohiro Misono
On 2018/05/30 19:19, Dan Carpenter wrote:
> Hello Tomohiro Misono,
>
> The patch 56bfce6502b7: "btrfs: Add unprivileged version of
> ino_lookup ioctl" from May 16, 2018, leads to the following static
> checker warning:
On 05/30/2018 11:33 PM, David Sterba wrote:
> On Wed, May 30, 2018 at 02:49:10PM +0800, Su Yue wrote:
>> btrfs_alloc_path() may fail due to no enough memory,
>> so let the function return -ENOMEM instead of -ENOENT is better.
>>
>> Signed-off-by: Su Yue
>
> Reviewed-by: David Sterba
>
>
On 28.05.2018 19:12, David Sterba wrote:
> On Mon, May 28, 2018 at 03:26:58PM +0300, Nikolay Borisov wrote:
>> dmesg looks like:
>> [6.649213] WARNING: CPU: 0 PID: 2838 at fs/btrfs/transaction.c:303
>> record_root_in_trans+0x38/0xd0
>
> Found in the logs. I reported it to the
On Tue, May 29, 2018 at 12:24:31PM -0700, Omar Sandoval wrote:
> On Tue, May 22, 2018 at 09:59:50AM -0700, Omar Sandoval wrote:
> > From: Omar Sandoval
> >
> > btrfs_truncate() uses two variables for error handling, ret and err (if
> > this sounds familiar, it's because
tree: https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git
blk-iolatency
head: 6fd950dfd5f71e7eba6d0763c6861669cec7963f
commit: f624090ed7dadc44d46a8a0b4381ab286c9f45fb [12/13] block: introduce
blk-iolatency io controller
config: i386-allyesconfig (attached as .config)
On Wed, May 02, 2018 at 03:19:32PM +0300, Nikolay Borisov wrote:
> Currently this function handles both the READ and WRITE dio cases. This
> is facilitated by a bunch of 'if' statements, a goto short-circuit
> statement and a very perverse aliasing of "!created"(READ) case
> by setting lockstart =
On Wed, May 30, 2018 at 02:49:10PM +0800, Su Yue wrote:
> btrfs_alloc_path() may fail due to no enough memory,
> so let the function return -ENOMEM instead of -ENOENT is better.
>
> Signed-off-by: Su Yue
Reviewed-by: David Sterba
Thanks. I've audited all return codes after failed path
On Wed, May 30, 2018 at 04:48:56PM +0800, Su Yue wrote:
> In cow_file_range(), create_io_em() may fail, but its return value is
> not recorded.
> Then return value may be 0 even it failed which is a wrong behavior.
>
> Let cow_file_range() return PTR_ERR(em) if create_io_em() failed.
>
>
On Wed, May 30, 2018 at 12:58:24PM +0800, Qu Wenruo wrote:
>
> Reported-by: James Harvey
> Signed-off-by: Qu Wenruo
> ---
> changelog:
> v3->v4:
Patch replaced, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to
On Wed, May 30, 2018 at 11:00:38AM +0800, Gu Jinxiang wrote:
> From: Gu JinXiang
>
> Since commit 7775c8184ec0
> ("btrfs: remove unused parameter from btrfs_subvolume_release_metadata")
> parameter qgroup_reserved is not used by caller
> of function btrfs_subvolume_reserve_metadata.
> So remove
Hello Tomohiro Misono,
The patch 56bfce6502b7: "btrfs: Add unprivileged version of
ino_lookup ioctl" from May 16, 2018, leads to the following static
checker warning:
fs/btrfs/ioctl.c:2478 btrfs_search_path_in_tree_user()
error: 'temp_inode' dereferencing possible ERR_PTR()
On 30.05.2018 11:48, Su Yue wrote:
> In cow_file_range(), create_io_em() may fail, but its return value is
> not recorded.
> Then return value may be 0 even it failed which is a wrong behavior.
>
> Let cow_file_range() return PTR_ERR(em) if create_io_em() failed.
>
> Signed-off-by: Su Yue
In cow_file_range(), create_io_em() may fail, but its return value is
not recorded.
Then return value may be 0 even it failed which is a wrong behavior.
Let cow_file_range() return PTR_ERR(em) if create_io_em() failed.
Signed-off-by: Su Yue
---
fs/btrfs/inode.c | 4 +++-
1 file changed, 3
On 30.05.2018 10:25, Misono Tomohiro wrote:
> Print tree name instead of number to make output more readable.
>
> Example:
> [before]
>extent data backref root 5 objectid 257 offset 16384 count 1
>
>tree block backref root 18446744073709551607
>
> [after]
>extent data backref
Print tree name instead of number to make output more readable.
Example:
[before]
extent data backref root 5 objectid 257 offset 16384 count 1
tree block backref root 18446744073709551607
[after]
extent data backref root FS_TREE objectid 257 offset 16384 count 1
tree block
On 2018年05月30日 15:01, Nikolay Borisov wrote:
>
>
> On 30.05.2018 07:40, Qu Wenruo wrote:
>> Under certain KVM load and LTP tests, we are possible to hit the
>> following calltrace if quota is enabled:
>> --
>> BTRFS critical (device vda2): unable to find logical 8820195328 length 4096
>>
On 30.05.2018 09:58, Anand Jain wrote:
> btrfs_free_stale_devices() is a static function drop the btrfs prefix.
>
> Signed-off-by: Anand Jain
Nit: I think this patch could be dropped, it's not a set-in-stone rule
that static function shouldn't have btrfs_ prefix. Personally, I'd
prefer all
On 30.05.2018 07:40, Qu Wenruo wrote:
> Under certain KVM load and LTP tests, we are possible to hit the
> following calltrace if quota is enabled:
> --
> BTRFS critical (device vda2): unable to find logical 8820195328 length 4096
> BTRFS critical (device vda2): unable to find logical
On 30.05.2018 09:55, Misono Tomohiro wrote:
> On 2018/05/30 15:28, Nikolay Borisov wrote:
>>
>>
>> On 30.05.2018 07:55, Misono Tomohiro wrote:
>>> Print tree name instead of number to make output more readable.
>>>
>>> Signed-off-by: Misono Tomohiro
>>> ---
>>> print-tree.c | 5 +++--
>>> 1
On 2018/05/30 15:28, Nikolay Borisov wrote:
>
>
> On 30.05.2018 07:55, Misono Tomohiro wrote:
>> Print tree name instead of number to make output more readable.
>>
>> Signed-off-by: Misono Tomohiro
>> ---
>> print-tree.c | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff
btrfs_free_stale_devices() finds the stale (not opened) matching
device path in the fs_uuid list. We are already under uuid_mutex
so when we check for each fs_devices, hold the respective
device_list_mutex.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 25 +++--
1 file
btrfs_free_stale_devices() is a static function drop the btrfs prefix.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index a6a23b0185e5..afb3504f4097 100644
---
Over the years we named %fs_devices and %devices to represent,
the struct btrfs_fs_devices and the struct btrfs_device. So
follow the same norm here too. No functional changes.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 35 ++-
1 file changed, 18
Include items of fs_uuids::fs_devices to be protected by
device_list_mutex, like (but not limited to) fs_devices::opened,
fs_devices::total_devices and fs_devices::num_devices. This is
been done in the code already.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 3 ++-
1 file changed, 2
When the device is added or if the device pointer is retrieved
for writing, make sure that device_list_mutex is held. Also
make sure it is held when we check fs_devices::opened and
fs_devices::total_devices is updated.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 16
1
btrfs_free_stale_devices() looks for device path reused for another
fsid, and deletes the older fs_devices::device entry.
In preparation to handle proper locks in the device_list_add(),
move the btrfs_free_stale_devices() outside of the device_list_add()
as these two functions has two distinct
Patch 1/6 is a preparatory patch to add the required device_list_mutex
in device_list_add() in the patch 2/6.
Patch 3/6 updates the comments on device_list_mutex.
Patch 4/6 is just a cleanup patch no functional changes.
Patch 5/6 adds the required device_list_mutex in
btrfs_free_stale_device().
On 30.05.2018 07:40, Qu Wenruo wrote:
> Introduce a small helper, btrfs_mark_bg_unused(), to accquire needed
> locks and add a block group to unused_bgs list.
>
> No functional modification, and only 3 callers are involved.
>
> Signed-off-by: Qu Wenruo
Reviewed-by: Nikolay Borisov
> ---
>
On 30.05.2018 09:49, Su Yue wrote:
> btrfs_alloc_path() may fail due to no enough memory,
> so let the function return -ENOMEM instead of -ENOENT is better.
>
> Signed-off-by: Su Yue
Reviewed-by: Nikolay Borisov
> ---
> Changelog:
> v2:
> Add commit message to describe the patch. Thanks
btrfs_alloc_path() may fail due to no enough memory,
so let the function return -ENOMEM instead of -ENOENT is better.
Signed-off-by: Su Yue
---
Changelog:
v2:
Add commit message to describe the patch. Thanks Nikolay.
fs/btrfs/extent-tree.c | 2 +-
1 file changed, 1 insertion(+), 1
On 30.05.2018 07:55, Misono Tomohiro wrote:
> Print tree name instead of number to make output more readable.
>
> Signed-off-by: Misono Tomohiro
> ---
> print-tree.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/print-tree.c b/print-tree.c
> index
On 30.05.2018 05:07, Su Yue wrote:
> Signed-off-by: Su Yue
Generally we discourage commit log messages. I understand this patch is
very obvious but put a sentence saying that btrfs_alloc_path can fail
due to enomem hence returning enomem is the right ting to do here.
> ---
>
On 05/29/2018 02:50 PM, Gu Jinxiang wrote:
From: Gu JinXiang
patch for commit 921518924084
("btrfs: handle dynamically reappearing missing device").
---
v4:
::
. No need to set in_fs_metadata flag as its already set on missing device
---
> Since BTRFS_DEV_STATE_IN_FS_METADATA will be clear
34 matches
Mail list logo