From: Boaz Harrosh <bharrosh@panasas.com>
To: Peng Tao <bergwolf@gmail.com>
Cc: linuxnfs <linux-nfs@vger.kernel.org>, Benny Halevy <bhalevy@tonian.com>
Subject: Re: pnfs LD partial sector write
Date: Thu, 26 Jul 2012 19:00:27 +0300 [thread overview]
Message-ID: <5011699B.1090706@panasas.com> (raw)
In-Reply-To: <CA+a=Yy5-GRoD17LqN0wi2ssO01XDknYyJg-pPe3tTXZQ3GCd9w@mail.gmail.com>
On 07/26/2012 06:07 PM, Peng Tao wrote:
> On Thu, Jul 26, 2012 at 10:12 PM, Boaz Harrosh <bharrosh@panasas.com> wrote:
>> There is an easy locking solution for DIO which will not cost much
>> for DIO and will cost nothing for buffered IO. You use the page-cache
>> page lock.
>>
>> What you do is grab the zero-page of each block lock before/during writing to
>> any block. So for your example above they will all be serialized by page-zero
>> lock.
> Yeah, I agree this can work. But I'd prefer not to mix DIO with buffer
> IO, which is often error prone. If in any case I need to serialize
> AIODIO, I'd prefer to do it in easier ways like locking invalid
> extents etc, without messing with page cache.
>
Ye, just keep it BLOCK aligned and that's it. Apps will learn fast enough.
Simple is always better.
Currently I support any alignment but I might do the same in objlayout in
the raid5/6 case. and DIO
<>
> Or maybe somehow through statfs(2), since the blocksize attribute is
> actually a file system's attribute instead of block device's.
>
Good point!!
statfs->f_bsize
man statfs:
long f_bsize; /* optimal transfer block size */
What does NFS return in there now? maybe let LD override on that?
I'll support a patch as such we could use it as well.
Cheers
Boaz
prev parent reply other threads:[~2012-07-26 16:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-25 7:31 pnfs LD partial sector write Peng Tao
2012-07-25 10:28 ` Boaz Harrosh
2012-07-25 10:45 ` Boaz Harrosh
2012-07-25 14:43 ` Peng Tao
2012-07-25 20:29 ` Boaz Harrosh
2012-07-26 2:43 ` Peng Tao
2012-07-26 7:29 ` Boaz Harrosh
2012-07-26 8:25 ` Peng Tao
2012-07-26 12:16 ` Boaz Harrosh
2012-07-26 13:57 ` Peng Tao
2012-07-26 14:30 ` Boaz Harrosh
2012-07-26 15:30 ` Peng Tao
2012-07-26 15:44 ` Boaz Harrosh
2012-07-26 7:47 ` Boaz Harrosh
2012-07-26 9:12 ` Peng Tao
2012-07-26 14:12 ` Boaz Harrosh
2012-07-26 15:07 ` Peng Tao
2012-07-26 16:00 ` Boaz Harrosh [this message]
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=5011699B.1090706@panasas.com \
--to=bharrosh@panasas.com \
--cc=bergwolf@gmail.com \
--cc=bhalevy@tonian.com \
--cc=linux-nfs@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