<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Li<br>
    </p>
    <div class="moz-cite-prefix">on 2019/12/31 13:25, Li Wang wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAEemH2coGZGjFLhHzeR4JJYWpERGypjRdXRQ2dO0f1=Drh2KOg@mail.gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div class="gmail_default" style="font-size:small">Hi,</div>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Thu, Dec 19, 2019 at 5:15
            PM Li Wang <<a href="mailto:liwang@redhat.com"
              target="_blank" moz-do-not-send="true">liwang@redhat.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div dir="ltr">
              <div dir="ltr">
                <div style="font-size:small"><br>
                </div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">On Thu, Dec 19, 2019
                  at 4:52 PM Sumit Garg <<a
                    href="mailto:sumit.garg@linaro.org" target="_blank"
                    moz-do-not-send="true">sumit.garg@linaro.org</a>>
                  wrote:<span class="gmail_default"
                    style="font-size:small"></span></div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex"><span
                    class="gmail_default" style="font-size:small">...</span><br>
                  >> To avoid similar scenarios, I suggested to
                  add a "sync()" call just<br>
                  >> prior to test here [1]. And I couldn't
                  reproduce the failure in<br>
                  >> 1000-times run with 4.19 kernel.<br>
                  ><br>
                  ><br>
                  > Yes, that makes sense to me.<br>
                  ><br>
                  <br>
                  Would you mind to give it a try and check if you could
                  reproduce the failure?<br>
                </blockquote>
                <div><br>
                </div>
                <div>
                  <div style="font-size:small">Actually, I haven't had
                    one time to reproduce it. This failure was reported
                    by CI jobs and very low frequency occurred. The fix
                    is based on a discussion with FS developer analysis.</div>
                  <div style="font-size:small"><br>
                  </div>
                  <div style="font-size:small">But I would have a try
                    with this patch(+ sync()).</div>
                </div>
              </div>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div>
            <div class="gmail_default" style="font-size:small">I have
              tried this for many different systems, and it doesn't hit
              the failure at least one time. So if no more comments, I
              would merge the patch as below in the next step.</div>
          </div>
        </div>
      </div>
    </blockquote>
    <pre>I have a question.we must call sync()? I think syncfs is more accurate.

Best Regards
Yang Xu
</pre>
    <blockquote type="cite"
cite="mid:CAEemH2coGZGjFLhHzeR4JJYWpERGypjRdXRQ2dO0f1=Drh2KOg@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div>
            <div class="gmail_default" style="font-size:small"><br>
            </div>
          </div>
          <div class="gmail_default" style="font-size:small">---
            a/testcases/kernel/syscalls/sync_file_range/sync_file_range02.c<br>
            +++
            b/testcases/kernel/syscalls/sync_file_range/sync_file_range02.c<br>
            @@ -48,6 +48,8 @@ static void verify_sync_file_range(struct
            testcase *tc)<br>
             <br>
                    lseek(fd, tc->write_off, SEEK_SET);<br>
             <br>
            +       sync();<br>
            +<br>
                    tst_dev_bytes_written(tst_device->dev);<br>
             <br>
                    tst_fill_fd(fd, 0, TST_MB, tc->write_size_mb);<br>
            @@ -66,8 +68,7 @@ static void verify_sync_file_range(struct
            testcase *tc)<br>
             <br>
                    SAFE_CLOSE(fd);<br>
             <br>
            -       if ((written >= tc->exp_sync_size) &&<br>
            -           (written <= (tc->exp_sync_size +
            tc->exp_sync_size/10)))<br>
            +       if (written >= tc->exp_sync_size)<br>
                            tst_res(TPASS, "%s", tc->desc);<br>
                    else<br>
                            tst_res(TFAIL, "%s: Synced %li, expected
            %li", tc->desc,<br>
          </div>
          <div class="gmail_default" style="font-size:small"><br>
          </div>
        </div>
        -- <br>
        <div dir="ltr">
          <div dir="ltr">
            <div>Regards,<br>
            </div>
            <div>Li Wang<br>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">
</pre>
    </blockquote>
  </body>
</html>