Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46277
b: refs/heads/master
c: e1d5b18
h: refs/heads/master
i:
  46275: 902e888
v: v3
  • Loading branch information
Steven Whitehouse committed Feb 5, 2007
1 parent 1666c21 commit 7c7d1d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c7b3383437ff41781964d1bf7f40ff8d7dd5bc47
refs/heads/master: e1d5b18ae92d0bbfe66dc2b4bab65006d32c5f7d
28 changes: 3 additions & 25 deletions trunk/fs/gfs2/ops_address.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static int gfs2_readpage(struct file *file, struct page *page)
* the page lock and the glock) and return having done no I/O. Its
* obviously not something we'd want to do on too regular a basis.
* Any I/O we ignore at this time will be done via readpage later.
* 2. We have to handle stuffed files here too.
* 2. We don't handle stuffed files here we let readpage do the honours.
* 3. mpage_readpages() does most of the heavy lifting in the common case.
* 4. gfs2_get_block() is relied upon to set BH_Boundary in the right places.
* 5. We use LM_FLAG_TRY_1CB here, effectively we then have lock-ahead as
Expand All @@ -269,8 +269,7 @@ static int gfs2_readpages(struct file *file, struct address_space *mapping,
struct gfs2_inode *ip = GFS2_I(inode);
struct gfs2_sbd *sdp = GFS2_SB(inode);
struct gfs2_holder gh;
unsigned page_idx;
int ret;
int ret = 0;
int do_unlock = 0;

if (likely(file != &gfs2_internal_file_sentinel)) {
Expand All @@ -289,29 +288,8 @@ static int gfs2_readpages(struct file *file, struct address_space *mapping,
goto out_unlock;
}
skip_lock:
if (gfs2_is_stuffed(ip)) {
struct pagevec lru_pvec;
pagevec_init(&lru_pvec, 0);
for (page_idx = 0; page_idx < nr_pages; page_idx++) {
struct page *page = list_entry(pages->prev, struct page, lru);
prefetchw(&page->flags);
list_del(&page->lru);
if (!add_to_page_cache(page, mapping,
page->index, GFP_KERNEL)) {
ret = stuffed_readpage(ip, page);
unlock_page(page);
if (!pagevec_add(&lru_pvec, page))
__pagevec_lru_add(&lru_pvec);
} else {
page_cache_release(page);
}
}
pagevec_lru_add(&lru_pvec);
ret = 0;
} else {
/* What we really want to do .... */
if (!gfs2_is_stuffed(ip))
ret = mpage_readpages(mapping, pages, nr_pages, gfs2_get_block);
}

if (do_unlock) {
gfs2_glock_dq_m(1, &gh);
Expand Down

0 comments on commit 7c7d1d6

Please sign in to comment.