Re: [PATCH] open_by_handle: Don't use MAX_HANDLE_SZ

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



On Thu, Oct 29, 2020 at 11:01 AM Palmer Dabbelt
<palmerdabbelt@xxxxxxxxxx> wrote:
>
> When I compile this normally I end up with the definition of
> MAX_HANDLE_SZ, but when I compile it in a minimal buildroot-based
> environment I don't.  I'm not sure where this is supposed to come from,
> but as of 3f4760c2 ("open_by_handle: add option -z to query file handle
> size") it appears to be unnecessary.
>
> Signed-off-by: Palmer Dabbelt <palmerdabbelt@xxxxxxxxxx>
> ---
> I haven't actually run this, as I haven't figured out how to yet.  It
> does build, though.
> ---
>  src/open_by_handle.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/src/open_by_handle.c b/src/open_by_handle.c
> index 0f74ed08..ddeffb7a 100644
> --- a/src/open_by_handle.c
> +++ b/src/open_by_handle.c
> @@ -92,7 +92,6 @@ Examples:
>
>  struct handle {
>         struct file_handle fh;
> -       unsigned char fid[MAX_HANDLE_SZ];
>  } handle[MAXFILES], dir_handle;

This is absolutely wrong!

I don't know what's the best way to fix the build error,
but this fid member is absolutely needed.

For all I care, you can define MAX_TEST_HANDLE_SZ to 128 or to
MAX_HANDLE_SZ if it is defined.

The test doesn't really care what the value of MAX_HANDLE_SZ is.
It just needs to be large enough to accomodate for the size of file handles
of the tested filesystem.

Thanks,
Amir.



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux