lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 13 Aug 2008 15:02:23 +0900
From:	Hisashi Hifumi <>
To:	Mingming Cao <>, Chris Mason <>
Cc:	Jan Kara <>, Andrew Morton <>,,,
	Zach Brown <>
Subject: Re: [PATCH] jbd jbd2: fix
  diowritereturningEIOwhentry_to_release_page fails

At 05:06 08/08/13, Mingming Cao wrote:

>> With that said, I don't have strong feelings against falling back to
>> buffered IO when the invalidate fails.  
>It seems a little odd that we have to back to buffered IO in this case.
>The pages are all flushed,  DIO just want to make sure the
>journaltransactions who still keep those buffers are removed from their
>list. It did that, the only reason to keep DIO fail is someone else
>hasn't release the bh.
>Current code enforce all the buffers have to be freed and pages are
>removed from page cache, in order to force later read are from disk.  I
>am not sure why can't we just leave the page in the cache, just clear it
>uptodate flag, without reduce the page ref count?   I think DIO should
>proceed it's IO in this case...

Like this?
Following patch just clears PG_uptodate when try_to_release_page fails.

diff -Nrup linux-2.6.27-rc3/mm/truncate.c
---	2008-08-13 13:48:48.000000000 +0900
+++ linux-2.6.27-rc3/mm/truncate.c	2008-08-13 14:24:47.000000000 +0900
@@ -345,8 +345,10 @@ invalidate_complete_page2(struct address
 	if (page->mapping != mapping)
 		return 0;
-	if (PagePrivate(page) && !try_to_release_page(page, GFP_KERNEL))
-		return 0;
+	if (PagePrivate(page) && !try_to_release_page(page, GFP_KERNEL)) {
+		ClearPageUptodate(page);
+		return 1;
+	}
 	if (PageDirty(page))

But this patch may cause some issue.

ClearPageUptodate in truncate.c was removed at 2.6.27-rc2 because this triggers some 
problems around NFS,FUSE,madvice.

To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists