All of lore.kernel.org
 help / color / mirror / Atom feed
* A typo in io_u.c::get_next_file()?
@ 2014-06-28  0:54 Andrey Kuzmin
  2014-06-28  2:22 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Kuzmin @ 2014-06-28  0:54 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

diff --git a/io_u.c b/io_u.c
index e132fd9..f487b0a 100644
--- a/io_u.c
+++ b/io_u.c
@@ -1100,7 +1100,7 @@ out:

 static struct fio_file *get_next_file(struct thread_data *td)
 {
-       if (!(td->flags & TD_F_PROFILE_OPS)) {
+       if ((td->flags & TD_F_PROFILE_OPS)) {
                struct prof_io_ops *ops = &td->prof_io_ops;

                if (ops->get_next_file)


Regards,
Andrey


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: A typo in io_u.c::get_next_file()?
  2014-06-28  0:54 A typo in io_u.c::get_next_file()? Andrey Kuzmin
@ 2014-06-28  2:22 ` Jens Axboe
  2014-06-28  3:55   ` Andrey Kuzmin
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2014-06-28  2:22 UTC (permalink / raw)
  To: Andrey Kuzmin; +Cc: fio

On 2014-06-27 18:54, Andrey Kuzmin wrote:
> diff --git a/io_u.c b/io_u.c
> index e132fd9..f487b0a 100644
> --- a/io_u.c
> +++ b/io_u.c
> @@ -1100,7 +1100,7 @@ out:
>
>   static struct fio_file *get_next_file(struct thread_data *td)
>   {
> -       if (!(td->flags & TD_F_PROFILE_OPS)) {
> +       if ((td->flags & TD_F_PROFILE_OPS)) {
>                  struct prof_io_ops *ops = &td->prof_io_ops;
>
>                  if (ops->get_next_file)

Hah indeed, good catch! I was wondering why it would not segfault, but I 
guess we fall through normally anyway. So it only impacts profiles that 
have get_next_file set, which makes it a minor issue.

Thanks for the patch! Applied.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: A typo in io_u.c::get_next_file()?
  2014-06-28  2:22 ` Jens Axboe
@ 2014-06-28  3:55   ` Andrey Kuzmin
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Kuzmin @ 2014-06-28  3:55 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

Still unsure how it could have worked all the way down to now ;). given
the default profile being null (unless I'm missing it being set
differently).
On Jun 27, 2014 7:22 PM, "Jens Axboe" <axboe@kernel.dk> wrote:

> On 2014-06-27 18:54, Andrey Kuzmin wrote:
>
>> diff --git a/io_u.c b/io_u.c
>> index e132fd9..f487b0a 100644
>> --- a/io_u.c
>> +++ b/io_u.c
>> @@ -1100,7 +1100,7 @@ out:
>>
>>   static struct fio_file *get_next_file(struct thread_data *td)
>>   {
>> -       if (!(td->flags & TD_F_PROFILE_OPS)) {
>> +       if ((td->flags & TD_F_PROFILE_OPS)) {
>>                  struct prof_io_ops *ops = &td->prof_io_ops;
>>
>>                  if (ops->get_next_file)
>>
>
> Hah indeed, good catch! I was wondering why it would not segfault, but I
> guess we fall through normally anyway. So it only impacts profiles that
> have get_next_file set, which makes it a minor issue.
>
> Thanks for the patch! Applied.
>
> --
> Jens Axboe
>
>

[-- Attachment #2: Type: text/html, Size: 1409 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-28  3:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-28  0:54 A typo in io_u.c::get_next_file()? Andrey Kuzmin
2014-06-28  2:22 ` Jens Axboe
2014-06-28  3:55   ` Andrey Kuzmin

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.