From: Eli Carter <eli.carter@inet.com>
To: linux-fsdevel@vger.kernel.org
Subject: [PATCH] cont_prepare_write question
Date: Mon, 21 Jul 2003 14:45:25 -0500 [thread overview]
Message-ID: <3F1C42D5.5050009@inet.com> (raw)
From a very basic look at cont_prepare_write() in fs/buffer.c, it looks
like it needs this patch to prevent an infinite loop when extending a
file by several blocks. (>8 for the 0.5k block case)
--- linux-2.5.68-rmk1/fs/buffer.c 2003/04/22 15:13:04 1.1.2.3
+++ linux-2.5.68-rmk1/fs/buffer.c 2003/07/21 19:38:40
@@ -2118,6 +2118,7 @@
goto out_unmap;
kaddr = kmap_atomic(new_page, KM_USER0);
memset(kaddr+zerofrom, 0, PAGE_CACHE_SIZE-zerofrom);
+ *bytes += PAGE_CACHE_SIZE-zerofrom;
flush_dcache_page(new_page);
kunmap_atomic(kaddr, KM_USER0);
__block_commit_write(inode, new_page,
I'm not going to pretend that I understand why, or what this exactly
accomplishes... it just seems to improve things somewhat in my case. If
someone could give a basic explanation of what is going on in this loop,
particularly in regards to how the loop is supposed to end, or a pointer
to something to read that would make this function clearer than mud, I'd
be very grateful.
Thanks,
Eli
--------------------. "If it ain't broke now,
Eli Carter \ it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------
reply other threads:[~2003-07-21 19:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F1C42D5.5050009@inet.com \
--to=eli.carter@inet.com \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox