public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 3/3] tst_fill_fs: Add alternate access pattern "flat"
Date: Mon, 12 Dec 2022 16:20:23 +0000	[thread overview]
Message-ID: <87o7s8sid2.fsf@suse.de> (raw)
In-Reply-To: <Y5dTzSQcwpfyRlna@rei>

Hello,

Cyril Hrubis <chrubis@suse.cz> writes:

> 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.

Ah, that was supposed to be added to the next open. However I guess it
can just be removed.

-- 
Thank you,
Richard.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2022-12-12 16:21 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
2022-12-12 16:20       ` Richard Palethorpe [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=87o7s8sid2.fsf@suse.de \
    --to=rpalethorpe@suse.de \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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