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
nexedi
linux
Commits
a25c32be
Commit
a25c32be
authored
Jun 07, 2013
by
Gabriel de Perthuis
Committed by
Kent Overstreet
Jun 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcache: Send a uevent with a cached device's UUID
Signed-off-by:
Gabriel de Perthuis
<
g2p.code@gmail.com
>
parent
bd206b51
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
drivers/md/bcache/super.c
drivers/md/bcache/super.c
+9
-3
No files found.
drivers/md/bcache/super.c
View file @
a25c32be
...
...
@@ -825,6 +825,11 @@ static void calc_cached_dev_sectors(struct cache_set *c)
void
bch_cached_dev_run
(
struct
cached_dev
*
dc
)
{
struct
bcache_device
*
d
=
&
dc
->
disk
;
char
*
env
[]
=
{
"DRIVER=bcache"
,
kasprintf
(
GFP_KERNEL
,
"CACHED_UUID=%pU"
,
dc
->
sb
.
uuid
),
NULL
};
if
(
atomic_xchg
(
&
dc
->
running
,
1
))
return
;
...
...
@@ -841,10 +846,11 @@ void bch_cached_dev_run(struct cached_dev *dc)
add_disk
(
d
->
disk
);
bd_link_disk_holder
(
dc
->
bdev
,
dc
->
disk
.
disk
);
#if 0
char *env[] = { "SYMLINK=label" , NULL };
/* won't show up in the uevent file, use udevadm monitor -e instead
* only class / kset properties are persistent */
kobject_uevent_env
(
&
disk_to_dev
(
d
->
disk
)
->
kobj
,
KOBJ_CHANGE
,
env
);
#endif
kfree
(
env
[
1
]);
if
(
sysfs_create_link
(
&
d
->
kobj
,
&
disk_to_dev
(
d
->
disk
)
->
kobj
,
"dev"
)
||
sysfs_create_link
(
&
disk_to_dev
(
d
->
disk
)
->
kobj
,
&
d
->
kobj
,
"bcache"
))
pr_debug
(
"error creating sysfs link"
);
...
...
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