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
2f96736a
Commit
2f96736a
authored
Mar 10, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Mar 10, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] (4/4) ->kill_sb() switchover
bdev filesystems switched. Changes documented in Locking and porting.
parent
d18f45e6
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
52 additions
and
17 deletions
+52
-17
Documentation/filesystems/Locking
Documentation/filesystems/Locking
+9
-3
Documentation/filesystems/porting
Documentation/filesystems/porting
+17
-0
fs/adfs/super.c
fs/adfs/super.c
+1
-0
fs/affs/super.c
fs/affs/super.c
+1
-0
fs/bfs/inode.c
fs/bfs/inode.c
+1
-0
fs/cramfs/inode.c
fs/cramfs/inode.c
+1
-0
fs/efs/super.c
fs/efs/super.c
+1
-0
fs/ext2/super.c
fs/ext2/super.c
+1
-0
fs/ext3/super.c
fs/ext3/super.c
+1
-0
fs/freevxfs/vxfs_super.c
fs/freevxfs/vxfs_super.c
+1
-0
fs/hfs/super.c
fs/hfs/super.c
+1
-0
fs/hpfs/super.c
fs/hpfs/super.c
+1
-0
fs/isofs/inode.c
fs/isofs/inode.c
+1
-0
fs/jffs/inode-v23.c
fs/jffs/inode-v23.c
+1
-0
fs/jffs2/super.c
fs/jffs2/super.c
+1
-0
fs/jfs/super.c
fs/jfs/super.c
+1
-0
fs/minix/inode.c
fs/minix/inode.c
+1
-0
fs/msdos/msdosfs_syms.c
fs/msdos/msdosfs_syms.c
+1
-0
fs/ntfs/fs.c
fs/ntfs/fs.c
+1
-0
fs/qnx4/inode.c
fs/qnx4/inode.c
+1
-0
fs/reiserfs/super.c
fs/reiserfs/super.c
+1
-0
fs/romfs/inode.c
fs/romfs/inode.c
+1
-0
fs/super.c
fs/super.c
+1
-14
fs/sysv/super.c
fs/sysv/super.c
+2
-0
fs/udf/super.c
fs/udf/super.c
+1
-0
fs/ufs/super.c
fs/ufs/super.c
+1
-0
fs/vfat/vfatfs_syms.c
fs/vfat/vfatfs_syms.c
+1
-0
No files found.
Documentation/filesystems/Locking
View file @
2f96736a
...
@@ -121,10 +121,16 @@ by better scheme anyway.
...
@@ -121,10 +121,16 @@ by better scheme anyway.
--------------------------- file_system_type ---------------------------
--------------------------- file_system_type ---------------------------
prototypes:
prototypes:
struct super_block *(*read_super) (struct super_block *, void *, int);
struct super_block *(*get_sb) (struct file_system_type *, int, char *, void *);
void (*kill_sb) (struct super_block *);
locking rules:
locking rules:
may block BKL ->s_lock mount_sem
may block BKL
yes yes yes maybe
get_sb yes yes
kill_sb yes yes
->get_sb() returns error or a locked superblock (exclusive on ->s_umount).
->kill_sb() takes a locked superblock, does all shutdown work on it,
unlocks and drops the reference.
--------------------------- address_space_operations --------------------------
--------------------------- address_space_operations --------------------------
prototypes:
prototypes:
...
...
Documentation/filesystems/porting
View file @
2f96736a
...
@@ -99,3 +99,20 @@ free to drop it...
...
@@ -99,3 +99,20 @@ free to drop it...
->link() callers hold ->i_sem on the object we are linking to. Some of your
->link() callers hold ->i_sem on the object we are linking to. Some of your
problems might be over...
problems might be over...
---
[mandatory]
new file_system_type method - kill_sb(superblock). If you are converting
an existing filesystem, set it according to ->fs_flags:
FS_REQUIRES_DEV - kill_block_super
FS_LITTER - kill_litter_super
neither - kill_anon_super
FS_LITTER is gone - just remove it from fs_flags.
---
[mandatory]
FS_SINGLE is gone (actually, that had happened back when ->get_sb()
went in - and hadn't been documented ;-/). Just remove it from fs_flags
(and see ->get_sb() entry for other actions).
fs/adfs/super.c
View file @
2f96736a
...
@@ -485,6 +485,7 @@ static struct file_system_type adfs_fs_type = {
...
@@ -485,6 +485,7 @@ static struct file_system_type adfs_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"adfs"
,
name:
"adfs"
,
get_sb:
adfs_get_sb
,
get_sb:
adfs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/affs/super.c
View file @
2f96736a
...
@@ -536,6 +536,7 @@ static struct file_system_type affs_fs_type = {
...
@@ -536,6 +536,7 @@ static struct file_system_type affs_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"affs"
,
name:
"affs"
,
get_sb:
affs_get_sb
,
get_sb:
affs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/bfs/inode.c
View file @
2f96736a
...
@@ -371,6 +371,7 @@ static struct file_system_type bfs_fs_type = {
...
@@ -371,6 +371,7 @@ static struct file_system_type bfs_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"bfs"
,
name:
"bfs"
,
get_sb:
bfs_get_sb
,
get_sb:
bfs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/cramfs/inode.c
View file @
2f96736a
...
@@ -458,6 +458,7 @@ static struct file_system_type cramfs_fs_type = {
...
@@ -458,6 +458,7 @@ static struct file_system_type cramfs_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"cramfs"
,
name:
"cramfs"
,
get_sb:
cramfs_get_sb
,
get_sb:
cramfs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/efs/super.c
View file @
2f96736a
...
@@ -24,6 +24,7 @@ static struct file_system_type efs_fs_type = {
...
@@ -24,6 +24,7 @@ static struct file_system_type efs_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"efs"
,
name:
"efs"
,
get_sb:
efs_get_sb
,
get_sb:
efs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/ext2/super.c
View file @
2f96736a
...
@@ -853,6 +853,7 @@ static struct file_system_type ext2_fs_type = {
...
@@ -853,6 +853,7 @@ static struct file_system_type ext2_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"ext2"
,
name:
"ext2"
,
get_sb:
ext2_get_sb
,
get_sb:
ext2_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/ext3/super.c
View file @
2f96736a
...
@@ -1778,6 +1778,7 @@ static struct file_system_type ext3_fs_type = {
...
@@ -1778,6 +1778,7 @@ static struct file_system_type ext3_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"ext3"
,
name:
"ext3"
,
get_sb:
ext3_get_sb
,
get_sb:
ext3_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/freevxfs/vxfs_super.c
View file @
2f96736a
...
@@ -237,6 +237,7 @@ static struct file_system_type vxfs_fs_type = {
...
@@ -237,6 +237,7 @@ static struct file_system_type vxfs_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"vxfs"
,
name:
"vxfs"
,
get_sb:
vxfs_get_sb
,
get_sb:
vxfs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/hfs/super.c
View file @
2f96736a
...
@@ -105,6 +105,7 @@ static struct file_system_type hfs_fs = {
...
@@ -105,6 +105,7 @@ static struct file_system_type hfs_fs = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"hfs"
,
name:
"hfs"
,
get_sb:
hfs_get_sb
,
get_sb:
hfs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/hpfs/super.c
View file @
2f96736a
...
@@ -619,6 +619,7 @@ static struct file_system_type hpfs_fs_type = {
...
@@ -619,6 +619,7 @@ static struct file_system_type hpfs_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"hpfs"
,
name:
"hpfs"
,
get_sb:
hpfs_get_sb
,
get_sb:
hpfs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/isofs/inode.c
View file @
2f96736a
...
@@ -1404,6 +1404,7 @@ static struct file_system_type iso9660_fs_type = {
...
@@ -1404,6 +1404,7 @@ static struct file_system_type iso9660_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"iso9660"
,
name:
"iso9660"
,
get_sb:
isofs_get_sb
,
get_sb:
isofs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/jffs/inode-v23.c
View file @
2f96736a
...
@@ -1763,6 +1763,7 @@ static struct file_system_type jffs_fs_type = {
...
@@ -1763,6 +1763,7 @@ static struct file_system_type jffs_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"jffs"
,
name:
"jffs"
,
get_sb:
jffs_get_sb
,
get_sb:
jffs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/jffs2/super.c
View file @
2f96736a
...
@@ -356,6 +356,7 @@ static struct file_system_type jffs2_fs_type = {
...
@@ -356,6 +356,7 @@ static struct file_system_type jffs2_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"jffs2"
,
name:
"jffs2"
,
get_sb:
jffs2_get_sb
,
get_sb:
jffs2_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/jfs/super.c
View file @
2f96736a
...
@@ -364,6 +364,7 @@ static struct file_system_type jfs_fs_type = {
...
@@ -364,6 +364,7 @@ static struct file_system_type jfs_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"jfs"
,
name:
"jfs"
,
get_sb:
jfs_get_sb
,
get_sb:
jfs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/minix/inode.c
View file @
2f96736a
...
@@ -567,6 +567,7 @@ static struct file_system_type minix_fs_type = {
...
@@ -567,6 +567,7 @@ static struct file_system_type minix_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"minix"
,
name:
"minix"
,
get_sb:
minix_get_sb
,
get_sb:
minix_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/msdos/msdosfs_syms.c
View file @
2f96736a
...
@@ -35,6 +35,7 @@ static struct file_system_type msdos_fs_type = {
...
@@ -35,6 +35,7 @@ static struct file_system_type msdos_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"msdos"
,
name:
"msdos"
,
get_sb:
msdos_get_sb
,
get_sb:
msdos_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/ntfs/fs.c
View file @
2f96736a
...
@@ -1168,6 +1168,7 @@ static struct file_system_type ntfs_fs_type = {
...
@@ -1168,6 +1168,7 @@ static struct file_system_type ntfs_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"ntfs"
,
name:
"ntfs"
,
get_sb:
ntfs_get_sb
,
get_sb:
ntfs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/qnx4/inode.c
View file @
2f96736a
...
@@ -549,6 +549,7 @@ static struct file_system_type qnx4_fs_type = {
...
@@ -549,6 +549,7 @@ static struct file_system_type qnx4_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"qnx4"
,
name:
"qnx4"
,
get_sb:
qnx4_get_sb
,
get_sb:
qnx4_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/reiserfs/super.c
View file @
2f96736a
...
@@ -1193,6 +1193,7 @@ static struct file_system_type reiserfs_fs_type = {
...
@@ -1193,6 +1193,7 @@ static struct file_system_type reiserfs_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"reiserfs"
,
name:
"reiserfs"
,
get_sb:
reiserfs_get_sb
,
get_sb:
reiserfs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/romfs/inode.c
View file @
2f96736a
...
@@ -540,6 +540,7 @@ static struct file_system_type romfs_fs_type = {
...
@@ -540,6 +540,7 @@ static struct file_system_type romfs_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"romfs"
,
name:
"romfs"
,
get_sb:
romfs_get_sb
,
get_sb:
romfs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/super.c
View file @
2f96736a
...
@@ -432,16 +432,6 @@ static void generic_shutdown_super(struct super_block *sb)
...
@@ -432,16 +432,6 @@ static void generic_shutdown_super(struct super_block *sb)
remove_super
(
sb
);
remove_super
(
sb
);
}
}
static
void
shutdown_super
(
struct
super_block
*
sb
)
{
struct
file_system_type
*
fs
=
sb
->
s_type
;
struct
block_device
*
bdev
=
sb
->
s_bdev
;
generic_shutdown_super
(
sb
);
bd_release
(
bdev
);
blkdev_put
(
bdev
,
BDEV_FS
);
}
void
kill_super
(
struct
super_block
*
sb
)
void
kill_super
(
struct
super_block
*
sb
)
{
{
struct
file_system_type
*
fs
=
sb
->
s_type
;
struct
file_system_type
*
fs
=
sb
->
s_type
;
...
@@ -450,10 +440,7 @@ void kill_super(struct super_block *sb)
...
@@ -450,10 +440,7 @@ void kill_super(struct super_block *sb)
return
;
return
;
down_write
(
&
sb
->
s_umount
);
down_write
(
&
sb
->
s_umount
);
if
(
fs
->
kill_sb
)
fs
->
kill_sb
(
sb
);
fs
->
kill_sb
(
sb
);
else
shutdown_super
(
sb
);
put_filesystem
(
fs
);
put_filesystem
(
fs
);
}
}
...
...
fs/sysv/super.c
View file @
2f96736a
...
@@ -490,6 +490,7 @@ static struct file_system_type sysv_fs_type = {
...
@@ -490,6 +490,7 @@ static struct file_system_type sysv_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"sysv"
,
name:
"sysv"
,
get_sb:
sysv_get_sb
,
get_sb:
sysv_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
@@ -497,6 +498,7 @@ static struct file_system_type v7_fs_type = {
...
@@ -497,6 +498,7 @@ static struct file_system_type v7_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"v7"
,
name:
"v7"
,
get_sb:
v7_get_sb
,
get_sb:
v7_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/udf/super.c
View file @
2f96736a
...
@@ -106,6 +106,7 @@ static struct file_system_type udf_fstype = {
...
@@ -106,6 +106,7 @@ static struct file_system_type udf_fstype = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"udf"
,
name:
"udf"
,
get_sb:
udf_get_sb
,
get_sb:
udf_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/ufs/super.c
View file @
2f96736a
...
@@ -1018,6 +1018,7 @@ static struct file_system_type ufs_fs_type = {
...
@@ -1018,6 +1018,7 @@ static struct file_system_type ufs_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"ufs"
,
name:
"ufs"
,
get_sb:
ufs_get_sb
,
get_sb:
ufs_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
fs/vfat/vfatfs_syms.c
View file @
2f96736a
...
@@ -21,6 +21,7 @@ static struct file_system_type vfat_fs_type = {
...
@@ -21,6 +21,7 @@ static struct file_system_type vfat_fs_type = {
owner:
THIS_MODULE
,
owner:
THIS_MODULE
,
name:
"vfat"
,
name:
"vfat"
,
get_sb:
vfat_get_sb
,
get_sb:
vfat_get_sb
,
kill_sb:
kill_block_super
,
fs_flags:
FS_REQUIRES_DEV
,
fs_flags:
FS_REQUIRES_DEV
,
};
};
...
...
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