Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
da353f6b
Commit
da353f6b
authored
Feb 14, 2017
by
David Sterba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs: constify device path passed to relevant helpers
Signed-off-by:
David Sterba
<
dsterba@suse.com
>
parent
0b581701
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
18 deletions
+22
-18
fs/btrfs/dev-replace.c
fs/btrfs/dev-replace.c
+3
-2
fs/btrfs/dev-replace.h
fs/btrfs/dev-replace.h
+3
-2
fs/btrfs/volumes.c
fs/btrfs/volumes.c
+10
-8
fs/btrfs/volumes.h
fs/btrfs/volumes.h
+6
-6
No files found.
fs/btrfs/dev-replace.c
View file @
da353f6b
...
@@ -304,8 +304,9 @@ void btrfs_after_dev_replace_commit(struct btrfs_fs_info *fs_info)
...
@@ -304,8 +304,9 @@ void btrfs_after_dev_replace_commit(struct btrfs_fs_info *fs_info)
dev_replace
->
cursor_left_last_write_of_item
;
dev_replace
->
cursor_left_last_write_of_item
;
}
}
int
btrfs_dev_replace_start
(
struct
btrfs_fs_info
*
fs_info
,
char
*
tgtdev_name
,
int
btrfs_dev_replace_start
(
struct
btrfs_fs_info
*
fs_info
,
u64
srcdevid
,
char
*
srcdev_name
,
int
read_src
)
const
char
*
tgtdev_name
,
u64
srcdevid
,
const
char
*
srcdev_name
,
int
read_src
)
{
{
struct
btrfs_root
*
root
=
fs_info
->
dev_root
;
struct
btrfs_root
*
root
=
fs_info
->
dev_root
;
struct
btrfs_trans_handle
*
trans
;
struct
btrfs_trans_handle
*
trans
;
...
...
fs/btrfs/dev-replace.h
View file @
da353f6b
...
@@ -27,8 +27,9 @@ int btrfs_run_dev_replace(struct btrfs_trans_handle *trans,
...
@@ -27,8 +27,9 @@ int btrfs_run_dev_replace(struct btrfs_trans_handle *trans,
void
btrfs_after_dev_replace_commit
(
struct
btrfs_fs_info
*
fs_info
);
void
btrfs_after_dev_replace_commit
(
struct
btrfs_fs_info
*
fs_info
);
int
btrfs_dev_replace_by_ioctl
(
struct
btrfs_fs_info
*
fs_info
,
int
btrfs_dev_replace_by_ioctl
(
struct
btrfs_fs_info
*
fs_info
,
struct
btrfs_ioctl_dev_replace_args
*
args
);
struct
btrfs_ioctl_dev_replace_args
*
args
);
int
btrfs_dev_replace_start
(
struct
btrfs_fs_info
*
fs_info
,
char
*
tgtdev_name
,
int
btrfs_dev_replace_start
(
struct
btrfs_fs_info
*
fs_info
,
u64
srcdevid
,
char
*
srcdev_name
,
int
read_src
);
const
char
*
tgtdev_name
,
u64
srcdevid
,
const
char
*
srcdev_name
,
int
read_src
);
void
btrfs_dev_replace_status
(
struct
btrfs_fs_info
*
fs_info
,
void
btrfs_dev_replace_status
(
struct
btrfs_fs_info
*
fs_info
,
struct
btrfs_ioctl_dev_replace_args
*
args
);
struct
btrfs_ioctl_dev_replace_args
*
args
);
int
btrfs_dev_replace_cancel
(
struct
btrfs_fs_info
*
fs_info
,
int
btrfs_dev_replace_cancel
(
struct
btrfs_fs_info
*
fs_info
,
...
...
fs/btrfs/volumes.c
View file @
da353f6b
...
@@ -1725,7 +1725,7 @@ static int btrfs_add_device(struct btrfs_trans_handle *trans,
...
@@ -1725,7 +1725,7 @@ static int btrfs_add_device(struct btrfs_trans_handle *trans,
* Function to update ctime/mtime for a given device path.
* Function to update ctime/mtime for a given device path.
* Mainly used for ctime/mtime based probe like libblkid.
* Mainly used for ctime/mtime based probe like libblkid.
*/
*/
static
void
update_dev_time
(
char
*
path_name
)
static
void
update_dev_time
(
c
onst
c
har
*
path_name
)
{
{
struct
file
*
filp
;
struct
file
*
filp
;
...
@@ -1851,7 +1851,8 @@ void btrfs_assign_next_active_device(struct btrfs_fs_info *fs_info,
...
@@ -1851,7 +1851,8 @@ void btrfs_assign_next_active_device(struct btrfs_fs_info *fs_info,
fs_info
->
fs_devices
->
latest_bdev
=
next_device
->
bdev
;
fs_info
->
fs_devices
->
latest_bdev
=
next_device
->
bdev
;
}
}
int
btrfs_rm_device
(
struct
btrfs_fs_info
*
fs_info
,
char
*
device_path
,
u64
devid
)
int
btrfs_rm_device
(
struct
btrfs_fs_info
*
fs_info
,
const
char
*
device_path
,
u64
devid
)
{
{
struct
btrfs_device
*
device
;
struct
btrfs_device
*
device
;
struct
btrfs_fs_devices
*
cur_devices
;
struct
btrfs_fs_devices
*
cur_devices
;
...
@@ -2091,7 +2092,7 @@ void btrfs_destroy_dev_replace_tgtdev(struct btrfs_fs_info *fs_info,
...
@@ -2091,7 +2092,7 @@ void btrfs_destroy_dev_replace_tgtdev(struct btrfs_fs_info *fs_info,
}
}
static
int
btrfs_find_device_by_path
(
struct
btrfs_fs_info
*
fs_info
,
static
int
btrfs_find_device_by_path
(
struct
btrfs_fs_info
*
fs_info
,
char
*
device_path
,
c
onst
c
har
*
device_path
,
struct
btrfs_device
**
device
)
struct
btrfs_device
**
device
)
{
{
int
ret
=
0
;
int
ret
=
0
;
...
@@ -2118,7 +2119,7 @@ static int btrfs_find_device_by_path(struct btrfs_fs_info *fs_info,
...
@@ -2118,7 +2119,7 @@ static int btrfs_find_device_by_path(struct btrfs_fs_info *fs_info,
}
}
int
btrfs_find_device_missing_or_by_path
(
struct
btrfs_fs_info
*
fs_info
,
int
btrfs_find_device_missing_or_by_path
(
struct
btrfs_fs_info
*
fs_info
,
char
*
device_path
,
c
onst
c
har
*
device_path
,
struct
btrfs_device
**
device
)
struct
btrfs_device
**
device
)
{
{
*
device
=
NULL
;
*
device
=
NULL
;
...
@@ -2151,7 +2152,8 @@ int btrfs_find_device_missing_or_by_path(struct btrfs_fs_info *fs_info,
...
@@ -2151,7 +2152,8 @@ int btrfs_find_device_missing_or_by_path(struct btrfs_fs_info *fs_info,
* Lookup a device given by device id, or the path if the id is 0.
* Lookup a device given by device id, or the path if the id is 0.
*/
*/
int
btrfs_find_device_by_devspec
(
struct
btrfs_fs_info
*
fs_info
,
u64
devid
,
int
btrfs_find_device_by_devspec
(
struct
btrfs_fs_info
*
fs_info
,
u64
devid
,
char
*
devpath
,
struct
btrfs_device
**
device
)
const
char
*
devpath
,
struct
btrfs_device
**
device
)
{
{
int
ret
;
int
ret
;
...
@@ -2307,7 +2309,7 @@ static int btrfs_finish_sprout(struct btrfs_trans_handle *trans,
...
@@ -2307,7 +2309,7 @@ static int btrfs_finish_sprout(struct btrfs_trans_handle *trans,
return
ret
;
return
ret
;
}
}
int
btrfs_init_new_device
(
struct
btrfs_fs_info
*
fs_info
,
char
*
device_path
)
int
btrfs_init_new_device
(
struct
btrfs_fs_info
*
fs_info
,
c
onst
c
har
*
device_path
)
{
{
struct
btrfs_root
*
root
=
fs_info
->
dev_root
;
struct
btrfs_root
*
root
=
fs_info
->
dev_root
;
struct
request_queue
*
q
;
struct
request_queue
*
q
;
...
@@ -2515,7 +2517,7 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, char *device_path)
...
@@ -2515,7 +2517,7 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, char *device_path)
}
}
int
btrfs_init_dev_replace_tgtdev
(
struct
btrfs_fs_info
*
fs_info
,
int
btrfs_init_dev_replace_tgtdev
(
struct
btrfs_fs_info
*
fs_info
,
char
*
device_path
,
c
onst
c
har
*
device_path
,
struct
btrfs_device
*
srcdev
,
struct
btrfs_device
*
srcdev
,
struct
btrfs_device
**
device_out
)
struct
btrfs_device
**
device_out
)
{
{
...
@@ -7102,7 +7104,7 @@ int btrfs_get_dev_stats(struct btrfs_fs_info *fs_info,
...
@@ -7102,7 +7104,7 @@ int btrfs_get_dev_stats(struct btrfs_fs_info *fs_info,
return
0
;
return
0
;
}
}
void
btrfs_scratch_superblocks
(
struct
block_device
*
bdev
,
char
*
device_path
)
void
btrfs_scratch_superblocks
(
struct
block_device
*
bdev
,
c
onst
c
har
*
device_path
)
{
{
struct
buffer_head
*
bh
;
struct
buffer_head
*
bh
;
struct
btrfs_super_block
*
disk_super
;
struct
btrfs_super_block
*
disk_super
;
...
...
fs/btrfs/volumes.h
View file @
da353f6b
...
@@ -422,16 +422,16 @@ void btrfs_close_extra_devices(struct btrfs_fs_devices *fs_devices, int step);
...
@@ -422,16 +422,16 @@ void btrfs_close_extra_devices(struct btrfs_fs_devices *fs_devices, int step);
void
btrfs_assign_next_active_device
(
struct
btrfs_fs_info
*
fs_info
,
void
btrfs_assign_next_active_device
(
struct
btrfs_fs_info
*
fs_info
,
struct
btrfs_device
*
device
,
struct
btrfs_device
*
this_dev
);
struct
btrfs_device
*
device
,
struct
btrfs_device
*
this_dev
);
int
btrfs_find_device_missing_or_by_path
(
struct
btrfs_fs_info
*
fs_info
,
int
btrfs_find_device_missing_or_by_path
(
struct
btrfs_fs_info
*
fs_info
,
char
*
device_path
,
c
onst
c
har
*
device_path
,
struct
btrfs_device
**
device
);
struct
btrfs_device
**
device
);
int
btrfs_find_device_by_devspec
(
struct
btrfs_fs_info
*
fs_info
,
u64
devid
,
int
btrfs_find_device_by_devspec
(
struct
btrfs_fs_info
*
fs_info
,
u64
devid
,
char
*
devpath
,
c
onst
c
har
*
devpath
,
struct
btrfs_device
**
device
);
struct
btrfs_device
**
device
);
struct
btrfs_device
*
btrfs_alloc_device
(
struct
btrfs_fs_info
*
fs_info
,
struct
btrfs_device
*
btrfs_alloc_device
(
struct
btrfs_fs_info
*
fs_info
,
const
u64
*
devid
,
const
u64
*
devid
,
const
u8
*
uuid
);
const
u8
*
uuid
);
int
btrfs_rm_device
(
struct
btrfs_fs_info
*
fs_info
,
int
btrfs_rm_device
(
struct
btrfs_fs_info
*
fs_info
,
char
*
device_path
,
u64
devid
);
c
onst
c
har
*
device_path
,
u64
devid
);
void
btrfs_cleanup_fs_uuids
(
void
);
void
btrfs_cleanup_fs_uuids
(
void
);
int
btrfs_num_copies
(
struct
btrfs_fs_info
*
fs_info
,
u64
logical
,
u64
len
);
int
btrfs_num_copies
(
struct
btrfs_fs_info
*
fs_info
,
u64
logical
,
u64
len
);
int
btrfs_grow_device
(
struct
btrfs_trans_handle
*
trans
,
int
btrfs_grow_device
(
struct
btrfs_trans_handle
*
trans
,
...
@@ -439,9 +439,9 @@ int btrfs_grow_device(struct btrfs_trans_handle *trans,
...
@@ -439,9 +439,9 @@ int btrfs_grow_device(struct btrfs_trans_handle *trans,
struct
btrfs_device
*
btrfs_find_device
(
struct
btrfs_fs_info
*
fs_info
,
u64
devid
,
struct
btrfs_device
*
btrfs_find_device
(
struct
btrfs_fs_info
*
fs_info
,
u64
devid
,
u8
*
uuid
,
u8
*
fsid
);
u8
*
uuid
,
u8
*
fsid
);
int
btrfs_shrink_device
(
struct
btrfs_device
*
device
,
u64
new_size
);
int
btrfs_shrink_device
(
struct
btrfs_device
*
device
,
u64
new_size
);
int
btrfs_init_new_device
(
struct
btrfs_fs_info
*
fs_info
,
char
*
path
);
int
btrfs_init_new_device
(
struct
btrfs_fs_info
*
fs_info
,
c
onst
c
har
*
path
);
int
btrfs_init_dev_replace_tgtdev
(
struct
btrfs_fs_info
*
fs_info
,
int
btrfs_init_dev_replace_tgtdev
(
struct
btrfs_fs_info
*
fs_info
,
char
*
device_path
,
c
onst
c
har
*
device_path
,
struct
btrfs_device
*
srcdev
,
struct
btrfs_device
*
srcdev
,
struct
btrfs_device
**
device_out
);
struct
btrfs_device
**
device_out
);
int
btrfs_balance
(
struct
btrfs_balance_control
*
bctl
,
int
btrfs_balance
(
struct
btrfs_balance_control
*
bctl
,
...
@@ -474,7 +474,7 @@ void btrfs_destroy_dev_replace_tgtdev(struct btrfs_fs_info *fs_info,
...
@@ -474,7 +474,7 @@ void btrfs_destroy_dev_replace_tgtdev(struct btrfs_fs_info *fs_info,
struct
btrfs_device
*
tgtdev
);
struct
btrfs_device
*
tgtdev
);
void
btrfs_init_dev_replace_tgtdev_for_resume
(
struct
btrfs_fs_info
*
fs_info
,
void
btrfs_init_dev_replace_tgtdev_for_resume
(
struct
btrfs_fs_info
*
fs_info
,
struct
btrfs_device
*
tgtdev
);
struct
btrfs_device
*
tgtdev
);
void
btrfs_scratch_superblocks
(
struct
block_device
*
bdev
,
char
*
device_path
);
void
btrfs_scratch_superblocks
(
struct
block_device
*
bdev
,
c
onst
c
har
*
device_path
);
int
btrfs_is_parity_mirror
(
struct
btrfs_mapping_tree
*
map_tree
,
int
btrfs_is_parity_mirror
(
struct
btrfs_mapping_tree
*
map_tree
,
u64
logical
,
u64
len
,
int
mirror_num
);
u64
logical
,
u64
len
,
int
mirror_num
);
unsigned
long
btrfs_full_stripe_len
(
struct
btrfs_fs_info
*
fs_info
,
unsigned
long
btrfs_full_stripe_len
(
struct
btrfs_fs_info
*
fs_info
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment