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
d219d003
Commit
d219d003
authored
Apr 03, 2002
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sanitize definition of sysvfs dinode.
parent
90c1d0fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
27 deletions
+6
-27
fs/sysv/inode.c
fs/sysv/inode.c
+4
-4
include/linux/sysv_fs.h
include/linux/sysv_fs.h
+2
-23
No files found.
fs/sysv/inode.c
View file @
d219d003
...
...
@@ -188,8 +188,8 @@ static void sysv_read_inode(struct inode *inode)
si
=
SYSV_I
(
inode
);
for
(
block
=
0
;
block
<
10
+
1
+
1
+
1
;
block
++
)
read3byte
(
sbi
,
&
raw_inode
->
i_
a
.
i_addb
[
3
*
block
],
(
unsigned
char
*
)
&
si
->
i_data
[
block
]);
read3byte
(
sbi
,
&
raw_inode
->
i_
data
[
3
*
block
],
(
u8
*
)
&
si
->
i_data
[
block
]);
brelse
(
bh
);
if
(
S_ISCHR
(
inode
->
i_mode
)
||
S_ISBLK
(
inode
->
i_mode
))
rdev
=
(
u16
)
fs32_to_cpu
(
sbi
,
si
->
i_data
[
0
]);
...
...
@@ -236,8 +236,8 @@ static struct buffer_head * sysv_update_inode(struct inode * inode)
if
(
S_ISCHR
(
inode
->
i_mode
)
||
S_ISBLK
(
inode
->
i_mode
))
si
->
i_data
[
0
]
=
cpu_to_fs32
(
sbi
,
kdev_t_to_nr
(
inode
->
i_rdev
));
for
(
block
=
0
;
block
<
10
+
1
+
1
+
1
;
block
++
)
write3byte
(
sbi
,
(
u
nsigned
char
*
)
&
si
->
i_data
[
block
],
&
raw_inode
->
i_
a
.
i_addb
[
3
*
block
]);
write3byte
(
sbi
,
(
u
8
*
)
&
si
->
i_data
[
block
],
&
raw_inode
->
i_
data
[
3
*
block
]);
mark_buffer_dirty
(
bh
);
return
bh
;
}
...
...
include/linux/sysv_fs.h
View file @
d219d003
...
...
@@ -176,40 +176,19 @@ struct coh_super_block {
};
/* SystemV/Coherent inode data on disk */
struct
sysv_inode
{
u16
i_mode
;
u16
i_nlink
;
u16
i_uid
;
u16
i_gid
;
u32
i_size
;
union
{
/* directories, regular files, ... */
unsigned
char
i_addb
[
3
*
(
10
+
1
+
1
+
1
)
+
1
];
/* zone numbers: max. 10 data blocks,
* then 1 indirection block,
* then 1 double indirection block,
* then 1 triple indirection block.
* Then maybe a "file generation number" ??
*/
/* named pipes on Coherent */
struct
{
char
p_addp
[
30
];
s16
p_pnc
;
s16
p_prx
;
s16
p_pwx
;
}
i_p
;
}
i_a
;
u8
i_data
[
3
*
(
10
+
1
+
1
+
1
)];
u8
i_gen
;
u32
i_atime
;
/* time of last access */
u32
i_mtime
;
/* time of last modification */
u32
i_ctime
;
/* time of creation */
};
/* The number of inodes per block is
sb->sv_inodes_per_block = block_size / sizeof(struct sysv_inode) */
/* The number of indirect pointers per block is
sb->sv_ind_per_block = block_size / sizeof(u32) */
/* SystemV/Coherent directory entry on disk */
#define SYSV_NAMELEN 14
/* max size of name in struct sysv_dir_entry */
struct
sysv_dir_entry
{
...
...
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