From: Ted Ts'o <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>, ksumrall@google.com
Subject: Re: [PATCH] Support systems without posix_memalign() and memalign()
Date: Wed, 2 May 2012 15:40:58 -0400 [thread overview]
Message-ID: <20120502194058.GA18002@thunk.org> (raw)
In-Reply-To: <C93BF332-FFF4-45E1-811D-6E641F54C9BD@dilger.ca>
On Wed, May 02, 2012 at 12:52:06PM -0600, Andreas Dilger wrote:
>
> Won't this cause e.g. the 16kB/64kB blocksize regression tests to
> fail on MacOS? I've been assuming that the memalign functionality
> is only necessary for O_DIRECT, which isn't even working on MacOS,
> so it is enough to just return an unaligned memory chunk and it
> will work for normal buffered IO on MacOS.
Hmm, good point. What we should probably do is fix things so we only
try to use ext2fs_get_memalign() if we are doing O_DIRECT in the first
place, since can be be overhead using ext2fs_memalign if it's not
needed, especially if we are using valloc().
I don't want to leave ext2fs_get_memalign doing something which isn't
as the function is documented, even if it's good enough for our
current needs and it will just work today. That leaves behind an
accident waiting to happen later on --- for example if some progam
uses ext2fs_get_memalign() for some use other than what we currently
assume that it will be used for...
- Ted
next prev parent reply other threads:[~2012-05-02 19:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-02 18:30 [PATCH] Support systems without posix_memalign() and memalign() Theodore Ts'o
2012-05-02 18:52 ` Andreas Dilger
2012-05-02 19:40 ` Ted Ts'o [this message]
2012-05-02 20:01 ` Ken Sumrall
2012-05-02 20:21 ` Ted Ts'o
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=20120502194058.GA18002@thunk.org \
--to=tytso@mit.edu \
--cc=adilger@dilger.ca \
--cc=ksumrall@google.com \
--cc=linux-ext4@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).