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
7539d9d1
Commit
7539d9d1
authored
Apr 03, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Automerge
parents
115d1e1b
a0780cdf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
23 deletions
+31
-23
fs/jfs/jfs_metapage.c
fs/jfs/jfs_metapage.c
+17
-3
fs/jfs/jfs_metapage.h
fs/jfs/jfs_metapage.h
+14
-20
No files found.
fs/jfs/jfs_metapage.c
View file @
7539d9d1
...
@@ -511,10 +511,26 @@ static void __write_metapage(metapage_t * mp)
...
@@ -511,10 +511,26 @@ static void __write_metapage(metapage_t * mp)
jFYI
(
1
,
(
"__write_metapage done
\n
"
));
jFYI
(
1
,
(
"__write_metapage done
\n
"
));
}
}
static
inline
void
sync_metapage
(
metapage_t
*
mp
)
{
struct
page
*
page
=
mp
->
page
;
page_cache_get
(
page
);
lock_page
(
page
);
/* we're done with this page - no need to check for errors */
if
(
page
->
buffers
)
{
writeout_one_page
(
page
);
waitfor_one_page
(
page
);
}
UnlockPage
(
page
);
page_cache_release
(
page
);
}
void
release_metapage
(
metapage_t
*
mp
)
void
release_metapage
(
metapage_t
*
mp
)
{
{
log_t
*
log
;
log_t
*
log
;
struct
inode
*
ip
;
jFYI
(
1
,
jFYI
(
1
,
(
"release_metapage: mp = 0x%p, flag = 0x%lx
\n
"
,
mp
,
(
"release_metapage: mp = 0x%p, flag = 0x%lx
\n
"
,
mp
,
...
@@ -528,8 +544,6 @@ void release_metapage(metapage_t * mp)
...
@@ -528,8 +544,6 @@ void release_metapage(metapage_t * mp)
return
;
return
;
}
}
ip
=
(
struct
inode
*
)
mp
->
mapping
->
host
;
assert
(
mp
->
count
);
assert
(
mp
->
count
);
if
(
--
mp
->
count
||
atomic_read
(
&
mp
->
nohomeok
))
{
if
(
--
mp
->
count
||
atomic_read
(
&
mp
->
nohomeok
))
{
unlock_metapage
(
mp
);
unlock_metapage
(
mp
);
...
...
fs/jfs/jfs_metapage.h
View file @
7539d9d1
...
@@ -84,33 +84,27 @@ extern metapage_t *__get_metapage(struct inode *inode,
...
@@ -84,33 +84,27 @@ extern metapage_t *__get_metapage(struct inode *inode,
__get_metapage(inode, lblock, size, absolute, TRUE)
__get_metapage(inode, lblock, size, absolute, TRUE)
extern
void
release_metapage
(
metapage_t
*
);
extern
void
release_metapage
(
metapage_t
*
);
extern
void
hold_metapage
(
metapage_t
*
,
int
);
#define flush_metapage(mp) \
static
inline
void
write_metapage
(
metapage_t
*
mp
)
{\
{
set_bit(META_dirty, &(mp)->flag);\
set_bit
(
META_dirty
,
&
mp
->
flag
);
set_bit(META_sync, &(mp)->flag);\
release_metapage
(
mp
);
release_metapage(mp);\
}
}
#define sync_metapage(mp) \
static
inline
void
flush_metapage
(
metapage_t
*
mp
)
generic_buffer_fdatasync((struct inode *)mp->mapping->host,\
{
mp->page->index, mp->page->index + 1)
set_bit
(
META_sync
,
&
mp
->
flag
);
write_metapage
(
mp
);
#define write_metapage(mp) \
{\
set_bit(META_dirty, &(mp)->flag);\
release_metapage(mp);\
}
}
#define discard_metapage(mp) \
static
inline
void
discard_metapage
(
metapage_t
*
mp
)
{
\
{
clear_bit(META_dirty, &
(mp)->flag);\
clear_bit
(
META_dirty
,
&
mp
->
flag
);
set_bit(META_discard, &
(mp)->flag);\
set_bit
(
META_discard
,
&
mp
->
flag
);
release_metapage(mp);
\
release_metapage
(
mp
);
}
}
extern
void
hold_metapage
(
metapage_t
*
,
int
);
/*
/*
* This routine uses hash to explicitly find small number of pages
* This routine uses hash to explicitly find small number of pages
*/
*/
...
...
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