Re: [PATCH v4] ksmbd: remove unnecessary generic_fillattr in smb2_open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2022년 8월 24일 (수) 오후 11:09, Namjae Jeon <linkinjeon@xxxxxxxxxx>님이 작성:
>
> 2022-08-12 11:11 GMT+09:00, Hyunchul Lee <hyc.lee@xxxxxxxxx>:
> > 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@xxxxxxxxx>
> 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




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux