From: Carlos Maiolino <cmaiolino@redhat.com>
To: Gionatan Danti <g.danti@assyoma.it>
Cc: linux-xfs@vger.kernel.org
Subject: Re: Block size and read-modify-write
Date: Tue, 2 Jan 2018 11:25:39 +0100 [thread overview]
Message-ID: <20180102102539.5kh2tjo5gmlewiek@odin.usersys.redhat.com> (raw)
In-Reply-To: <021d36d95a9de952ddd38cc56d18df4f@assyoma.it>
On Fri, Dec 29, 2017 at 12:14:14AM +0100, Gionatan Danti wrote:
> Hi list,
> I would ask a question: how XFS block size affect read-modify-write in case
> of very small writes?
>
Hi,
> For example, suppose an XFS filesystem with the default 4K data block size.
> Am I correct saying that:
> - a 512B normal, cached writes will cause a read-modify-write of the entire
> 4K sector?
> - a 512B O_DIRECT write will *not* cause a read-modify-write of the 4K
> sector, rather it will be flushed to disk as-is (512 bytes in length)?
>
IIRC, although the DIO requirement is to have writes aligned to the logical sector
size, issuing such IOs not properly aligned with the filesystem block size, have
a few consequences.
- It will require exclusive inode io locks, so serializing IOs to the inode
- And yes, it will require a RMW to the block in question, all IO are always
made in filesystem block size units.
I'm probably missing something else here though, but these two are the things I
had in my mind.
Cheers
> Thanks.
>
> --
> Danti Gionatan
> Supporto Tecnico
> Assyoma S.r.l. - www.assyoma.it
> email: g.danti@assyoma.it - info@assyoma.it
> GPG public key ID: FF5F32A8
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Carlos
next prev parent reply other threads:[~2018-01-02 10:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-28 23:14 Block size and read-modify-write Gionatan Danti
2018-01-02 10:25 ` Carlos Maiolino [this message]
2018-01-03 1:19 ` Dave Chinner
2018-01-03 8:19 ` Carlos Maiolino
2018-01-03 14:54 ` Gionatan Danti
2018-01-03 21:47 ` Dave Chinner
2018-01-03 22:09 ` Gionatan Danti
2018-01-03 22:59 ` Dave Chinner
2018-01-04 1:38 ` Gionatan Danti
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=20180102102539.5kh2tjo5gmlewiek@odin.usersys.redhat.com \
--to=cmaiolino@redhat.com \
--cc=g.danti@assyoma.it \
--cc=linux-xfs@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;
as well as URLs for NNTP newsgroup(s).