All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hyunchul Lee <hyc.lee@gmail.com>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steve French <smfrench@gmail.com>
Subject: Re: [PATCH v4] ksmbd: remove unnecessary generic_fillattr in smb2_open
Date: Thu, 25 Aug 2022 09:59:53 +0900	[thread overview]
Message-ID: <CANFS6bbnGjM3hG+75wHrXPvj=GGvnHMAfjF1Phs+faGO1Q8eCw@mail.gmail.com> (raw)
In-Reply-To: <CAKYAXd8SRsvxxCckYPQRMxRHKiHQNQY7WvbSCKZiy4fJK4sOyQ@mail.gmail.com>

2022년 8월 24일 (수) 오후 11:09, Namjae Jeon <linkinjeon@kernel.org>님이 작성:
>
> 2022-08-12 11:11 GMT+09:00, Hyunchul Lee <hyc.lee@gmail.com>:
> > Remove unnecessary generic_fillattr to fix wrong
> > AllocationSize of SMB2_CREATE response, And
> > Move the call of ksmbd_vfs_getattr above the place
> > where stat is needed because of truncate.
> >
> > This patch fixes wrong AllocationSize of SMB2_CREATE
> > response. Because ext4 updates inode->i_blocks only
> > when disk space is allocated, generic_fillattr does
> > not set stat.blocks properly for delayed allocation.
> > But ext4 returns the blocks that include the delayed
> > allocation blocks when getattr is called.
> >
> > The issue can be reproduced with commands below:
> >
> > touch ${FILENAME}
> > xfs_io -c "pwrite -S 0xAB 0 40k" ${FILENAME}
> > xfs_io -c "stat" ${FILENAME}
> >
> > 40KB are written, but the count of blocks is 8.
> >
> > Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
> This patch seems to cause the smb2.create.open test in smbtorture to
> fail. Can you reproduce it too?

Yes, this issue can be reproduced. I will look into this.

-- 
Thanks,
Hyunchul

      reply	other threads:[~2022-08-25  1:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12  2:11 [PATCH v4] ksmbd: remove unnecessary generic_fillattr in smb2_open Hyunchul Lee
2022-08-14  0:59 ` Namjae Jeon
2022-08-24 14:09 ` Namjae Jeon
2022-08-25  0:59   ` Hyunchul Lee [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='CANFS6bbnGjM3hG+75wHrXPvj=GGvnHMAfjF1Phs+faGO1Q8eCw@mail.gmail.com' \
    --to=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=smfrench@gmail.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.