All of lore.kernel.org
 help / color / mirror / Atom feed
From: Badari Pulavarty <pbadari@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: 2.6.10-rc1-mm2 DIO failures
Date: Fri, 12 Nov 2004 16:22:11 -0800	[thread overview]
Message-ID: <419553B3.7000802@us.ibm.com> (raw)

Hi Andrew,

I see LTP DIO test failures on 2.6.10-rc1-mm2 while doing
direct-IO write to filesystem files.

This is due to the changes in generic_file_direct_IO(). I haven't
looked at what exactly happening here (whats faling with page shoot 
down). But we end up getting -EIO.

  /*
- * Called under i_sem for writes to S_ISREG files
+ * Called under i_sem for writes to S_ISREG files.   Returns -EIO if 
something
+ * went wrong during pagecache shootdown.
   */
  ssize_t
  generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec 
*iov,
@@ -2539,14 +2540,24 @@ generic_file_direct_IO(int rw, struct ki
         struct address_space *mapping = file->f_mapping;
         ssize_t retval;

+       /*
+        * If it's a write, unmap all mmappings of the file up-front.  This
+        * will cause any pte dirty bits to be propagated into the 
pageframes
+        * for the subsequent filemap_write_and_wait().
+        */
+       if (rw == WRITE && mapping_mapped(mapping))
+               unmap_mapping_range(mapping, 0, -1, 0);
...


Thanks,
Badari


  # ./diotest2
diotest02    1  PASS  :  Read with Direct IO, Write without
write failed:Input/output error
[2] Write Direct failed
diotest02    2  FAIL  :  Write with Direct IO, Read without
diotest02    3  PASS  :  Read, Write with Direct IO
diotest2 1/3 testblocks failed

             reply	other threads:[~2004-11-13  0:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-13  0:22 Badari Pulavarty [this message]
2004-11-13  0:36 ` 2.6.10-rc1-mm2 DIO failures Andrew Morton
2004-11-14 20:02   ` Badari Pulavarty

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=419553B3.7000802@us.ibm.com \
    --to=pbadari@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.