lkml.org 
[lkml]   [2020]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] nvmet: add revalidation support to bdev and file backed namespaces
Date
On 04/02/2020 12:31 PM, Anthony Iliopoulos wrote:
> +void nvmet_file_ns_revalidate(struct nvmet_ns *ns)
> +{
> + struct kstat stat;
> +
> + if (!ns->file)
> + return;
No need for the above check.
> +
> + if (vfs_getattr(&ns->file->f_path,
> + &stat, STATX_SIZE, AT_STATX_FORCE_SYNC))
> + return;

Error handling needed ? What should we set ns->size if vfs_getattr
fails ? in case of error what nvmet_identify_ns() report success or a
failure ?
> +
> + ns->size = stat.size;
bdev checks the ns->size != size, why the same check is not here ?

Just remove the check from bdev and see my comment there.
> +}


\
 
 \ /
  Last update: 2020-04-03 22:30    [W:0.149 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site