lists.openwall.net   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  linux-hardening  linux-cve-announce  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]
Message-Id: <6.0.0.20.2.20080813144259.03d393d0@172.19.0.2>
Date:	Wed, 13 Aug 2008 15:02:23 +0900
From:	Hisashi Hifumi <hifumi.hisashi@....ntt.co.jp>
To:	Mingming Cao <cmm@...ibm.com>, Chris Mason <chris.mason@...cle.com>
Cc:	Jan Kara <jack@...e.cz>, Andrew Morton <akpm@...ux-foundation.org>,
	linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	Zach Brown <zach.brown@...cle.com>
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.org/mm/truncate.c linux-2.6.27-rc3/mm/truncate.c
--- linux-2.6.27-rc3.org/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;
+	}
 
 	spin_lock_irq(&mapping->tree_lock);
 	if (PageDirty(page))


But this patch may cause some issue.
See, 
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=84209e02de48d72289650cc5a7ae8dd18223620f;hp=2b12a4c524812fb3f6ee590a02e65b95c8c32229

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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ