From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v6] Refactor aiocp using new LTP API
Date: Thu, 11 Aug 2022 12:25:07 +0200 [thread overview]
Message-ID: <YvTZA/l8FyDghGH4@rei> (raw)
In-Reply-To: <YvTPEoDUp4AKu/0V@pevik>
Hi!
> > I guess that we can do a little trick such as making the buffer with
> > random data slightly bigger and choosing a random start offset in that
> > etc.
>
> I tested Andreas patches from v2 to v6 and aiocp with -f DIRECT works only on
> btrfs. Running on $TMPDIR being on ext4, xfs, tmpfs endup with EINVAL:
>
> # ./aiocp -b 1k -n 1 -f DIRECT
> aiocp.c:240: TINFO: Maximum AIO blocks: 65536
> aiocp.c:265: TINFO: Fill srcfile.bin with random data
> aiocp.c:267: TBROK: open(srcfile.bin,16450,0666) failed: EINVAL (22)
>
> Any idea what could be wrong?
There are couple of things wrong in there actually. First of all when
the file is prepared in the test setup the flags passed on the
commandline shouldn't be used at all, since the buffer in the function
that fills the file with random data is not aligned at all.
Secondly looking at the flags in the failing open we seem to pass O_RDWR
so my guess would be that O_DIRECT is supported only for O_RDONLY or
O_WRONLY file descriptors.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2022-08-11 10:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-10 9:28 [LTP] [PATCH v6] Refactor aiocp using new LTP API Andrea Cervesato via ltp
2022-08-10 10:37 ` Cyril Hrubis
2022-08-10 12:28 ` Andrea Cervesato via ltp
2022-08-10 12:37 ` Cyril Hrubis
2022-08-11 9:42 ` Petr Vorel
2022-08-11 10:25 ` Cyril Hrubis [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=YvTZA/l8FyDghGH4@rei \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/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.