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
3952101e
Commit
3952101e
authored
Dec 11, 2002
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] add a new xfs_mount parameter to xfs_blkdev_get
SGI Modid: 2.5.x-xfs:slinx:134788a
parent
c5c9a566
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
18 deletions
+21
-18
fs/xfs/linux/xfs_super.c
fs/xfs/linux/xfs_super.c
+2
-0
fs/xfs/linux/xfs_super.h
fs/xfs/linux/xfs_super.h
+3
-1
fs/xfs/xfs_mount.h
fs/xfs/xfs_mount.h
+0
-5
fs/xfs/xfs_vfsops.c
fs/xfs/xfs_vfsops.c
+16
-12
No files found.
fs/xfs/linux/xfs_super.c
View file @
3952101e
...
@@ -466,8 +466,10 @@ xfs_initialize_vnode(
...
@@ -466,8 +466,10 @@ xfs_initialize_vnode(
}
}
}
}
/*ARGSUSED*/
int
int
xfs_blkdev_get
(
xfs_blkdev_get
(
xfs_mount_t
*
mp
,
const
char
*
name
,
const
char
*
name
,
struct
block_device
**
bdevp
)
struct
block_device
**
bdevp
)
{
{
...
...
fs/xfs/linux/xfs_super.h
View file @
3952101e
...
@@ -78,12 +78,14 @@
...
@@ -78,12 +78,14 @@
#define LINVFS_SET_VFS(s, vfsp) \
#define LINVFS_SET_VFS(s, vfsp) \
((s)->s_fs_info = vfsp)
((s)->s_fs_info = vfsp)
struct
xfs_mount
;
struct
pb_target
;
struct
pb_target
;
struct
block_device
;
struct
block_device
;
extern
void
xfs_initialize_vnode
(
bhv_desc_t
*
,
vnode_t
*
,
bhv_desc_t
*
,
int
);
extern
void
xfs_initialize_vnode
(
bhv_desc_t
*
,
vnode_t
*
,
bhv_desc_t
*
,
int
);
extern
int
xfs_blkdev_get
(
const
char
*
,
struct
block_device
**
);
extern
int
xfs_blkdev_get
(
struct
xfs_mount
*
,
const
char
*
,
struct
block_device
**
);
extern
void
xfs_blkdev_put
(
struct
block_device
*
);
extern
void
xfs_blkdev_put
(
struct
block_device
*
);
extern
struct
pb_target
*
xfs_alloc_buftarg
(
struct
block_device
*
);
extern
struct
pb_target
*
xfs_alloc_buftarg
(
struct
block_device
*
);
...
...
fs/xfs/xfs_mount.h
View file @
3952101e
...
@@ -428,11 +428,6 @@ int xfs_syncsub(xfs_mount_t *, int, int, int *);
...
@@ -428,11 +428,6 @@ int xfs_syncsub(xfs_mount_t *, int, int, int *);
void
xfs_initialize_perag
(
xfs_mount_t
*
,
int
);
void
xfs_initialize_perag
(
xfs_mount_t
*
,
int
);
void
xfs_xlatesb
(
void
*
,
struct
xfs_sb
*
,
int
,
xfs_arch_t
,
__int64_t
);
void
xfs_xlatesb
(
void
*
,
struct
xfs_sb
*
,
int
,
xfs_arch_t
,
__int64_t
);
int
xfs_blkdev_get
(
const
char
*
,
struct
block_device
**
);
void
xfs_blkdev_put
(
struct
block_device
*
);
struct
xfs_buftarg
*
xfs_alloc_buftarg
(
struct
block_device
*
);
void
xfs_free_buftarg
(
struct
xfs_buftarg
*
);
/*
/*
* Flags for freeze operations.
* Flags for freeze operations.
*/
*/
...
...
fs/xfs/xfs_vfsops.c
View file @
3952101e
...
@@ -381,8 +381,9 @@ xfs_finish_flags(
...
@@ -381,8 +381,9 @@ xfs_finish_flags(
* (2) logical volume with data and log subvolumes.
* (2) logical volume with data and log subvolumes.
* (3) logical volume with data, log, and realtime subvolumes.
* (3) logical volume with data, log, and realtime subvolumes.
*
*
* The Linux VFS took care of finding and opening the data volume for
* We only have to handle opening the log and realtime volumes here if
* us. We have to handle the other two (if present) here.
* they are present. The data subvolume has already been opened by
* get_sb_bdev() and is stored in vfsp->vfs_super->s_bdev.
*/
*/
STATIC
int
STATIC
int
xfs_mount
(
xfs_mount
(
...
@@ -398,19 +399,24 @@ xfs_mount(
...
@@ -398,19 +399,24 @@ xfs_mount(
ddev
=
vfsp
->
vfs_super
->
s_bdev
;
ddev
=
vfsp
->
vfs_super
->
s_bdev
;
logdev
=
rtdev
=
NULL
;
logdev
=
rtdev
=
NULL
;
/*
* Allocate VFS private data (xfs mount structure).
*/
mp
=
xfs_mount_init
();
/*
/*
* Open real time and log devices - order is important.
* Open real time and log devices - order is important.
*/
*/
if
(
args
->
logname
[
0
])
{
if
(
args
->
logname
[
0
])
{
error
=
xfs_blkdev_get
(
args
->
logname
,
&
logdev
);
error
=
xfs_blkdev_get
(
mp
,
args
->
logname
,
&
logdev
);
if
(
error
)
if
(
error
)
return
error
;
goto
free_mp
;
}
}
if
(
args
->
rtname
[
0
])
{
if
(
args
->
rtname
[
0
])
{
error
=
xfs_blkdev_get
(
args
->
rtname
,
&
rtdev
);
error
=
xfs_blkdev_get
(
mp
,
args
->
rtname
,
&
rtdev
);
if
(
error
)
{
if
(
error
)
{
xfs_blkdev_put
(
logdev
);
xfs_blkdev_put
(
logdev
);
return
error
;
goto
free_mp
;
}
}
if
(
rtdev
==
ddev
||
rtdev
==
logdev
)
{
if
(
rtdev
==
ddev
||
rtdev
==
logdev
)
{
...
@@ -418,15 +424,11 @@ xfs_mount(
...
@@ -418,15 +424,11 @@ xfs_mount(
"XFS: Cannot mount filesystem with identical rtdev and ddev/logdev."
);
"XFS: Cannot mount filesystem with identical rtdev and ddev/logdev."
);
xfs_blkdev_put
(
logdev
);
xfs_blkdev_put
(
logdev
);
xfs_blkdev_put
(
rtdev
);
xfs_blkdev_put
(
rtdev
);
return
EINVAL
;
error
=
EINVAL
;
goto
free_mp
;
}
}
}
}
/*
* Allocate VFS private data (xfs mount structure).
*/
mp
=
xfs_mount_init
();
vfs_insertbhv
(
vfsp
,
&
mp
->
m_bhv
,
&
xfs_vfsops
,
mp
);
vfs_insertbhv
(
vfsp
,
&
mp
->
m_bhv
,
&
xfs_vfsops
,
mp
);
mp
->
m_ddev_targp
=
xfs_alloc_buftarg
(
ddev
);
mp
->
m_ddev_targp
=
xfs_alloc_buftarg
(
ddev
);
...
@@ -476,6 +478,8 @@ xfs_mount(
...
@@ -476,6 +478,8 @@ xfs_mount(
xfs_binval
(
mp
->
m_rtdev_targp
);
xfs_binval
(
mp
->
m_rtdev_targp
);
}
}
xfs_unmountfs_close
(
mp
,
NULL
);
xfs_unmountfs_close
(
mp
,
NULL
);
free_mp:
xfs_mount_free
(
mp
,
1
);
xfs_mount_free
(
mp
,
1
);
return
error
;
return
error
;
}
}
...
...
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