search for: pageuptod

Displaying 20 results from an estimated 47 matches for "pageuptod".

2007 Apr 18
0
[patch 7/9] Guest page hinting: minor fault optimization.
...0); diff -urpN linux-2.6/mm/filemap.c linux-2.6-patched/mm/filemap.c --- linux-2.6/mm/filemap.c 2006-09-01 12:50:24.000000000 +0200 +++ linux-2.6-patched/mm/filemap.c 2006-09-01 12:50:25.000000000 +0200 @@ -1185,6 +1185,12 @@ page_not_up_to_date: /* Did somebody else fill it already? */ if (PageUptodate(page)) { unlock_page(page); + /* + * Because we held an additional reference + * to the page while we read it in the page + * could not be made volatile. Do it now. + */ + page_make_volatile(page, 2); goto page_ok; } @@ -1576,13 +1582,13 @@ retry_all: * Do we have...
2007 Apr 18
0
[patch 7/9] Guest page hinting: minor fault optimization.
...0); diff -urpN linux-2.6/mm/filemap.c linux-2.6-patched/mm/filemap.c --- linux-2.6/mm/filemap.c 2006-09-01 12:50:24.000000000 +0200 +++ linux-2.6-patched/mm/filemap.c 2006-09-01 12:50:25.000000000 +0200 @@ -1185,6 +1185,12 @@ page_not_up_to_date: /* Did somebody else fill it already? */ if (PageUptodate(page)) { unlock_page(page); + /* + * Because we held an additional reference + * to the page while we read it in the page + * could not be made volatile. Do it now. + */ + page_make_volatile(page, 2); goto page_ok; } @@ -1576,13 +1582,13 @@ retry_all: * Do we have...
2012 Jan 25
3
[PATCH] Btrfs: Check for NULL page in extent_range_uptodate
...remaining problem with a thread becoming stuck in wait_on_page_locked(page) in the read_extent_buffer_pages(...) function in extent_io.c for (i = start_i; i < num_pages; i++) { page = extent_buffer_page(eb, i); wait_on_page_locked(page); if (!PageUptodate(page)) ret = -EIO; } This patch leaves the issue with the locked page yet to be resolved. Signed-off-by: Mitch Harder <mitch.harder@sabayonlinux.org> --- fs/btrfs/extent_io.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/fs/btrfs...
2023 Mar 02
1
[PATCH] ocfs2: Fix data corruption after failed write
...cfs2/aops.c b/fs/ocfs2/aops.c index 1d65f6ef00ca..0394505fdce3 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -1977,11 +1977,26 @@ int ocfs2_write_end_nolock(struct address_space *mapping, } if (unlikely(copied < len) && wc->w_target_page) { + loff_t new_isize; + if (!PageUptodate(wc->w_target_page)) copied = 0; - ocfs2_zero_new_buffers(wc->w_target_page, start+copied, - start+len); + new_isize = max_t(loff_t, i_size_read(inode), pos + copied); + if (new_isize > page_offset(wc->w_target_page)) + ocfs2_zero_new_buffers(wc->w_target_page,...
2023 Mar 20
2
FAILED: patch "[PATCH] ocfs2: fix data corruption after failed write" failed to apply to 5.10-stable tree
...cfs2/aops.c b/fs/ocfs2/aops.c index 1d65f6ef00ca..0394505fdce3 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -1977,11 +1977,26 @@ int ocfs2_write_end_nolock(struct address_space *mapping, } if (unlikely(copied < len) && wc->w_target_page) { + loff_t new_isize; + if (!PageUptodate(wc->w_target_page)) copied = 0; - ocfs2_zero_new_buffers(wc->w_target_page, start+copied, - start+len); + new_isize = max_t(loff_t, i_size_read(inode), pos + copied); + if (new_isize > page_offset(wc->w_target_page)) + ocfs2_zero_new_buffers(wc->w_target_page,...
2023 Mar 20
1
FAILED: patch "[PATCH] ocfs2: fix data corruption after failed write" failed to apply to 4.19-stable tree
...cfs2/aops.c b/fs/ocfs2/aops.c index 1d65f6ef00ca..0394505fdce3 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -1977,11 +1977,26 @@ int ocfs2_write_end_nolock(struct address_space *mapping, } if (unlikely(copied < len) && wc->w_target_page) { + loff_t new_isize; + if (!PageUptodate(wc->w_target_page)) copied = 0; - ocfs2_zero_new_buffers(wc->w_target_page, start+copied, - start+len); + new_isize = max_t(loff_t, i_size_read(inode), pos + copied); + if (new_isize > page_offset(wc->w_target_page)) + ocfs2_zero_new_buffers(wc->w_target_page,...
2012 Oct 16
3
[PATCH] Change the check for PageReadahead into an else-if
...d(page)) { - page_cache_async_readahead(inode->i_mapping, - ra, NULL, page, index, - last_index + 1 - index); + } else if (PageReadahead(page)) { + page_cache_async_readahead(inode->i_mapping, + ra, NULL, page, index, + last_index + 1 - index); } if (!PageUptodate(page)) { diff --git a/mm/filemap.c b/mm/filemap.c index 3843445..d703224 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1113,8 +1113,7 @@ find_page: page = find_get_page(mapping, index); if (unlikely(page == NULL)) goto no_cached_page; - } - if (PageReadahead(page)) { + } else...
2010 Jul 16
1
[PATCH] ocfs2: make __ocfs2_page_mkwrite handle file end properly.
__ocfs2_page_mkwrite now is broken in handling file end. 1. the last page should be the page contains i_size - 1. 2. the len in the last page is also calculated wrong. So change them accordingly. Signed-off-by: Tao Ma <tao.ma at oracle.com> --- fs/ocfs2/mmap.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c index
2013 Oct 25
1
[PATCH] Btrfs: stop using vfs_read in send
...oto out; + + last_index = (offset + len - 1) >> PAGE_CACHE_SHIFT; + while (index <= last_index) { + unsigned cur_len = min_t(unsigned, len, PAGE_CACHE_SIZE); + + page = find_or_create_page(inode->i_mapping, index, GFP_NOFS); + if (!page) { + ret = -ENOMEM; + break; + } + + if (!PageUptodate(page)) { + btrfs_readpage(NULL, page); + lock_page(page); + if (!PageUptodate(page)) { + unlock_page(page); + page_cache_release(page); + ret = -EIO; + break; + } + } + + addr = kmap(page); + memcpy(sctx->read_buf + ret, addr + pg_offset, cur_len); + kunmap(page); + u...
2007 Apr 18
2
[patch 4/9] Guest page hinting: volatile swap cache.
...x/buffer_head.h> +#include <linux/swap.h> #include "internal.h" @@ -32,7 +33,8 @@ static inline int __page_discardable(str */ if (PageDirty(page) || PageReserved(page) || PageWriteback(page) || PageLocked(page) || PagePrivate(page) || PageDiscarded(page) || - !PageUptodate(page) || !PageLRU(page) || PageAnon(page)) + !PageUptodate(page) || !PageLRU(page) || + (PageAnon(page) && !PageSwapCache(page))) return 0; /* @@ -149,15 +151,21 @@ static void __page_discard(struct page * } spin_unlock_irq(&zone->lru_lock); - /* We can't...
2007 Apr 18
2
[patch 4/9] Guest page hinting: volatile swap cache.
...x/buffer_head.h> +#include <linux/swap.h> #include "internal.h" @@ -32,7 +33,8 @@ static inline int __page_discardable(str */ if (PageDirty(page) || PageReserved(page) || PageWriteback(page) || PageLocked(page) || PagePrivate(page) || PageDiscarded(page) || - !PageUptodate(page) || !PageLRU(page) || PageAnon(page)) + !PageUptodate(page) || !PageLRU(page) || + (PageAnon(page) && !PageSwapCache(page))) return 0; /* @@ -149,15 +151,21 @@ static void __page_discard(struct page * } spin_unlock_irq(&zone->lru_lock); - /* We can't...
2004 Jun 03
0
[PATCH] provide io_schedule for 2.4
(vs format-changes branch) --- src/inc/ocfs_compat.h (revision 994) +++ src/inc/ocfs_compat.h (working copy) @@ -52,6 +70,8 @@ #define unlock_page(p) UnlockPage(p) #define Page_Uptodate(p) PageUptodate(p) +#define io_schedule schedule + #else /* LINUX_VERSION_CODE < 2.6 */ #define OCFS_GENERIC_SB_MEMBER(sb) ((sb)->s_fs_info) --- src/hash.c (revision 994) +++ src/hash.c (working copy) @@ -536,11 +536,7 @@ #endif if (!do_timeout) { set_task_state(tsk, TASK_UNINTERRUPTIBLE);...
2010 Jun 21
0
[PATCH V3 6/8] Cleancache: btrfs hooks for cleancache
...linux/writeback.h> #include <linux/pagevec.h> +#include <linux/cleancache.h> #include "extent_io.h" #include "extent_map.h" #include "compat.h" @@ -2027,6 +2028,13 @@ static int __extent_read_full_page(struc set_page_extent_mapped(page); + if (!PageUptodate(page)) { + if (cleancache_get_page(page) == 0) { + BUG_ON(blocksize != PAGE_SIZE); + goto out; + } + } + end = page_end; while (1) { lock_extent(tree, start, end, GFP_NOFS); @@ -2151,6 +2159,7 @@ static int __extent_read_full_page(struc cur = cur + iosize; page_offset += iosiz...
2023 Mar 28
0
Patch "ocfs2: fix data corruption after failed write" has been added to the 5.10-stable tree
...s2/aops.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -1981,11 +1981,25 @@ int ocfs2_write_end_nolock(struct addres } if (unlikely(copied < len) && wc->w_target_page) { + loff_t new_isize; + if (!PageUptodate(wc->w_target_page)) copied = 0; - ocfs2_zero_new_buffers(wc->w_target_page, start+copied, - start+len); + new_isize = max_t(loff_t, i_size_read(inode), pos + copied); + if (new_isize > page_offset(wc->w_target_page)) + ocfs2_zero_new_buffers(wc->w_target_page,...
2023 Mar 28
0
Patch "ocfs2: fix data corruption after failed write" has been added to the 5.4-stable tree
...s2/aops.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -1990,11 +1990,25 @@ int ocfs2_write_end_nolock(struct addres } if (unlikely(copied < len) && wc->w_target_page) { + loff_t new_isize; + if (!PageUptodate(wc->w_target_page)) copied = 0; - ocfs2_zero_new_buffers(wc->w_target_page, start+copied, - start+len); + new_isize = max_t(loff_t, i_size_read(inode), pos + copied); + if (new_isize > page_offset(wc->w_target_page)) + ocfs2_zero_new_buffers(wc->w_target_page,...
2023 Mar 03
0
+ ocfs2-fix-data-corruption-after-failed-write.patch added to mm-hotfixes-unstable branch
...lt;akpm at linux-foundation.org> --- --- a/fs/ocfs2/aops.c~ocfs2-fix-data-corruption-after-failed-write +++ a/fs/ocfs2/aops.c @@ -1977,11 +1977,26 @@ int ocfs2_write_end_nolock(struct addres } if (unlikely(copied < len) && wc->w_target_page) { + loff_t new_isize; + if (!PageUptodate(wc->w_target_page)) copied = 0; - ocfs2_zero_new_buffers(wc->w_target_page, start+copied, - start+len); + new_isize = max_t(loff_t, i_size_read(inode), pos + copied); + if (new_isize > page_offset(wc->w_target_page)) + ocfs2_zero_new_buffers(wc->w_target_page,...
2023 Mar 21
1
[PATCH] ocfs2: fix data corruption after failed write
...cfs2/aops.c b/fs/ocfs2/aops.c index b6948813eb06..1353db3f7f48 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -2003,11 +2003,25 @@ int ocfs2_write_end_nolock(struct address_space *mapping, } if (unlikely(copied < len) && wc->w_target_page) { + loff_t new_isize; + if (!PageUptodate(wc->w_target_page)) copied = 0; - ocfs2_zero_new_buffers(wc->w_target_page, start+copied, - start+len); + new_isize = max_t(loff_t, i_size_read(inode), pos + copied); + if (new_isize > page_offset(wc->w_target_page)) + ocfs2_zero_new_buffers(wc->w_target_page,...
2011 Nov 29
3
[PATCH] fs: push file_update_time into ->page_mkwrite
...ct *vma, struct vm_fault *vmf) if (unlikely(nilfs_near_disk_full(inode->i_sb->s_fs_info))) return VM_FAULT_SIGBUS; /* -ENOSPC */ + file_update_time(vma->vm_file); lock_page(page); if (page->mapping != inode->i_mapping || page_offset(page) >= i_size_read(inode) || !PageUptodate(page)) { diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c index 3e9393c..27c59e5 100644 --- a/fs/ocfs2/mmap.c +++ b/fs/ocfs2/mmap.c @@ -141,6 +141,7 @@ static int ocfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) ocfs2_block_signals(&oldset); + file_update_time(vma-&gt...
2009 Jul 13
1
[PATCH 1/1] adds mlogs to aops.c
...size: %Lu", (unsigned long long)OCFS2_I(inode)->ip_blkno, (unsigned long long)size); - return -EROFS; + status = -EROFS; + goto bail; } kaddr = kmap_atomic(page, KM_USER0); @@ -245,7 +253,9 @@ int ocfs2_read_inline_data(struct inode *inode, struct page *page, SetPageUptodate(page); - return 0; +bail: + mlog_exit(status); + return status; } static int ocfs2_readpage_inline(struct inode *inode, struct page *page) @@ -253,6 +263,8 @@ static int ocfs2_readpage_inline(struct inode *inode, struct page *page) int ret; struct buffer_head *di_bh = NULL; + mlog_en...
2009 Jul 21
1
(no subject)
...size: %Lu", (unsigned long long)OCFS2_I(inode)->ip_blkno, (unsigned long long)size); - return -EROFS; + status = -EROFS; + goto bail; } kaddr = kmap_atomic(page, KM_USER0); @@ -245,7 +254,9 @@ int ocfs2_read_inline_data(struct inode *inode, struct page *page, SetPageUptodate(page); - return 0; +bail: + mlog_exit(status); + return status; } static int ocfs2_readpage_inline(struct inode *inode, struct page *page) @@ -253,6 +264,9 @@ static int ocfs2_readpage_inline(struct inode *inode, struct page *page) int ret; struct buffer_head *di_bh = NULL; + mlog_en...