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
485dc02f
Commit
485dc02f
authored
Apr 16, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Automerge
parents
91813920
0ec6ef22
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
44 deletions
+7
-44
fs/jfs/jfs_metapage.c
fs/jfs/jfs_metapage.c
+6
-44
kernel/ksyms.c
kernel/ksyms.c
+1
-0
No files found.
fs/jfs/jfs_metapage.c
View file @
485dc02f
...
@@ -91,32 +91,6 @@ static inline void lock_metapage(struct metapage *mp)
...
@@ -91,32 +91,6 @@ static inline void lock_metapage(struct metapage *mp)
__lock_metapage
(
mp
);
__lock_metapage
(
mp
);
}
}
/* We're currently re-evaluating the method we use to write metadata
* pages. Currently, we have to make sure there no dirty buffer_heads
* hanging around after we free the metadata page, since the same
* physical disk blocks may be used in a different address space and we
* can't write old data over the good data.
*
* The best way to do this now is with block_invalidate_page. However,
* this is only available in the newer kernels and is not exported
* to modules. block_flushpage is the next best, but it too is not exported
* to modules.
*
* In a module, about the best we have is generic_buffer_fdatasync. This
* synchronously writes any dirty buffers. This is not optimal, but it will
* keep old dirty buffers from overwriting newer data.
*/
static
inline
void
invalidate_page
(
metapage_t
*
mp
)
{
#ifdef MODULE
generic_buffer_fdatasync
(
mp
->
mapping
->
host
,
mp
->
index
,
mp
->
index
+
1
);
#else
lock_page
(
mp
->
page
);
block_flushpage
(
mp
->
page
,
0
);
UnlockPage
(
mp
->
page
);
#endif
}
int
__init
metapage_init
(
void
)
int
__init
metapage_init
(
void
)
{
{
int
i
;
int
i
;
...
@@ -559,8 +533,11 @@ void release_metapage(metapage_t * mp)
...
@@ -559,8 +533,11 @@ void release_metapage(metapage_t * mp)
clear_bit
(
META_sync
,
&
mp
->
flag
);
clear_bit
(
META_sync
,
&
mp
->
flag
);
}
}
if
(
test_bit
(
META_discard
,
&
mp
->
flag
))
if
(
test_bit
(
META_discard
,
&
mp
->
flag
))
{
invalidate_page
(
mp
);
lock_page
(
mp
->
page
);
block_flushpage
(
mp
->
page
,
0
);
UnlockPage
(
mp
->
page
);
}
page_cache_release
(
mp
->
page
);
page_cache_release
(
mp
->
page
);
INCREMENT
(
mpStat
.
pagefree
);
INCREMENT
(
mpStat
.
pagefree
);
...
@@ -593,9 +570,7 @@ void invalidate_metapages(struct inode *ip, unsigned long addr,
...
@@ -593,9 +570,7 @@ void invalidate_metapages(struct inode *ip, unsigned long addr,
int
l2BlocksPerPage
=
PAGE_CACHE_SHIFT
-
ip
->
i_sb
->
s_blocksize_bits
;
int
l2BlocksPerPage
=
PAGE_CACHE_SHIFT
-
ip
->
i_sb
->
s_blocksize_bits
;
struct
address_space
*
mapping
=
ip
->
i_mapping
;
struct
address_space
*
mapping
=
ip
->
i_mapping
;
metapage_t
*
mp
;
metapage_t
*
mp
;
#ifndef MODULE
struct
page
*
page
;
struct
page
*
page
;
#endif
/*
/*
* First, mark metapages to discard. They will eventually be
* First, mark metapages to discard. They will eventually be
...
@@ -612,27 +587,14 @@ void invalidate_metapages(struct inode *ip, unsigned long addr,
...
@@ -612,27 +587,14 @@ void invalidate_metapages(struct inode *ip, unsigned long addr,
/*
/*
* If in the metapage cache, we've got the page locked
* If in the metapage cache, we've got the page locked
*/
*/
#ifdef MODULE
UnlockPage
(
mp
->
page
);
generic_buffer_fdatasync
(
mp
->
mapping
->
host
,
mp
->
index
,
mp
->
index
+
1
);
lock_page
(
mp
->
page
);
#else
block_flushpage
(
mp
->
page
,
0
);
block_flushpage
(
mp
->
page
,
0
);
#endif
}
else
{
}
else
{
spin_unlock
(
&
meta_lock
);
spin_unlock
(
&
meta_lock
);
#ifdef MODULE
page
=
find_lock_page
(
mapping
,
lblock
>>
l2BlocksPerPage
);
generic_buffer_fdatasync
(
ip
,
lblock
<<
l2BlocksPerPage
,
(
lblock
+
1
)
<<
l2BlocksPerPage
);
#else
page
=
find_lock_page
(
mapping
,
lblock
>>
l2BlocksPerPage
);
if
(
page
)
{
if
(
page
)
{
block_flushpage
(
page
,
0
);
block_flushpage
(
page
,
0
);
UnlockPage
(
page
);
UnlockPage
(
page
);
}
}
#endif
}
}
}
}
}
}
...
...
kernel/ksyms.c
View file @
485dc02f
...
@@ -211,6 +211,7 @@ EXPORT_SYMBOL(unlock_buffer);
...
@@ -211,6 +211,7 @@ EXPORT_SYMBOL(unlock_buffer);
EXPORT_SYMBOL
(
__wait_on_buffer
);
EXPORT_SYMBOL
(
__wait_on_buffer
);
EXPORT_SYMBOL
(
___wait_on_page
);
EXPORT_SYMBOL
(
___wait_on_page
);
EXPORT_SYMBOL
(
generic_direct_IO
);
EXPORT_SYMBOL
(
generic_direct_IO
);
EXPORT_SYMBOL
(
discard_bh_page
);
EXPORT_SYMBOL
(
block_write_full_page
);
EXPORT_SYMBOL
(
block_write_full_page
);
EXPORT_SYMBOL
(
block_read_full_page
);
EXPORT_SYMBOL
(
block_read_full_page
);
EXPORT_SYMBOL
(
block_prepare_write
);
EXPORT_SYMBOL
(
block_prepare_write
);
...
...
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