From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: Richard Palethorpe <rpalethorpe@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 3/3] tst_fill_fs: Add alternate access pattern "flat"
Date: Mon, 12 Dec 2022 17:16:13 +0100 [thread overview]
Message-ID: <Y5dTzSQcwpfyRlna@rei> (raw)
In-Reply-To: <Y5dSLjK2MlCHMPN7@pevik>
Hi!
> > Depending on the workload, the way in which a file system is filled
> > will be different. The system calls will also be different.
>
> > This adds a fill mode which uses writev with uniform batches of
> > data. This simulates when the FS is filled by a program which batches
> > writes.
> ...
>
> FYI this broke CI on Alpine.
>
> > +++ b/lib/tst_fill_fs.c
> ...
> > +void fill_flat_vec(const char *path, int verbose)
> > +{
> > + int dir = SAFE_OPEN(path, O_PATH | O_DIRECTORY | O_FSYNC);
>
> Alpine has problem with O_FSYNC:
>
> In file included from ../include/tst_test.h:110,
> from tst_fill_fs.c:13:
> tst_fill_fs.c: In function 'fill_flat_vec':
> tst_fill_fs.c:76:58: error: 'O_FSYNC' undeclared (first use in this function); did you mean 'O_ASYNC'?
> 76 | int dir = SAFE_OPEN(path, O_PATH | O_DIRECTORY | O_FSYNC);
> | ^~~~~~~
> ../include/tst_safe_macros.h:90:58: note: in definition of macro 'SAFE_OPEN'
> 90 | safe_open(__FILE__, __LINE__, NULL, (pathname), (oflags), \
> | ^~~~~~
> tst_fill_fs.c:76:58: note: each undeclared identifier is reported only once for each function it appears in
> 76 | int dir = SAFE_OPEN(path, O_PATH | O_DIRECTORY | O_FSYNC);
> | ^~~~~~~
> ../include/tst_safe_macros.h:90:58: note: in definition of macro 'SAFE_OPEN'
> 90 | safe_open(__FILE__, __LINE__, NULL, (pathname), (oflags), \
> | ^~~~~~
> make: *** [../include/mk/rules.mk:15: tst_fill_fs.o] Error 1
>
> It actually does not have it in fcntl.h (and nowhere in the sources).
O_FSYNC originates from BSD it should be O_SYNC on Linux, but given that
this is only file descriptor passed to later openat() we can just remove
it instead since it does not make sense at all.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-12-12 16:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-12 13:55 [LTP] [PATCH v2 1/3] lib/tst_rand_data: Add statically defined data pattern Richard Palethorpe via ltp
2022-12-12 13:55 ` [LTP] [PATCH v2 2/3] tst_fill_fs: Ensure data is not easily compressed Richard Palethorpe via ltp
2022-12-12 13:55 ` [LTP] [PATCH v2 3/3] tst_fill_fs: Add alternate access pattern "flat" Richard Palethorpe via ltp
2022-12-12 14:34 ` Cyril Hrubis
2022-12-12 14:47 ` Richard Palethorpe
2022-12-12 16:09 ` Petr Vorel
2022-12-12 16:16 ` Cyril Hrubis [this message]
2022-12-12 16:20 ` Richard Palethorpe
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=Y5dTzSQcwpfyRlna@rei \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
--cc=rpalethorpe@suse.com \
/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.