From: Andi Kleen <ak@suse.de>
To: Asang K Dani <asang@yahoo.com>
Cc: Andi Kleen <ak@suse.de>, "Stephen C. Tweedie" <sct@redhat.com>,
linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk
Subject: Re: generic_file_write code segment in 2.2.18
Date: Fri, 5 Jan 2001 00:02:43 +0100 [thread overview]
Message-ID: <20010105000243.B5317@gruyere.muc.suse.de> (raw)
In-Reply-To: <20010104225858.14771.qmail@web2301.mail.yahoo.com>
In-Reply-To: <20010104225858.14771.qmail@web2301.mail.yahoo.com>; from asang@yahoo.com on Thu, Jan 04, 2001 at 02:58:58PM -0800
On Thu, Jan 04, 2001 at 02:58:58PM -0800, Asang K Dani wrote:
> --- Andi Kleen <ak@suse.de> wrote:
> > On Thu, Jan 04, 2001 at 10:42:34PM +0000, Stephen C. Tweedie wrote:
> > > No, because then you'd be skipping the updatepage() call if we
> > took a
> > > fault mid-copy after copying some data. That would imply you had
> > > dirtied the page cache without an updatepage().
> > >
> > > The current behaviour should just result in a short IO, which
> > should
> > > be fine.
> >
> > The problem is that the short write is not reported to the caller,
> > even when only zero bytes are copied (the page is corrupted anyways
> > though because cfu zeros the uncopied rest).
>
> I think it will be reported to caller, because when cfu copies 0
> bytes,
>
> bytes -= copy_from_user(dest, buf, bytes);
>
> will make 'bytes' zero. Since 'bytes' is 'zero' updatepage will not
> be called and status retains value '-EFAULT' and it breaks out of
> the while loop immediately.
Right for zero it is handled, but not for 1 byte copied but the rest zeroed
(which is a severe IO error)
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-04 23:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-04 22:58 Asang K Dani
2001-01-04 23:02 ` Andi Kleen [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-01-04 23:09 Asang K Dani
2001-01-04 5:29 Asang K Dani
2001-01-04 7:51 ` Andi Kleen
2001-01-04 22:42 ` Stephen C. Tweedie
2001-01-04 22:49 ` Andi Kleen
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=20010105000243.B5317@gruyere.muc.suse.de \
--to=ak@suse.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=asang@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sct@redhat.com \
/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
all inboxes | Powered by JetHome®