Re: [RFC PATCH 5/9] NFS: Implement NFSv4.2's OFFLOAD_STATUS XDR

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

 



On Wed, 09 Oct 2024, cel@xxxxxxxxxx wrote:
>  
> +static int decode_offload_status(struct xdr_stream *xdr,
> +				 struct nfs42_offload_status_res *res)
> +{
> +	ssize_t result;
> +	int status;
> +
> +	status = decode_op_hdr(xdr, OP_OFFLOAD_STATUS);
> +	if (status)
> +		return status;
> +	/* osr_count */
> +	if (xdr_stream_decode_u64(xdr, &res->osr_count) < 0)
> +		return -EIO;
> +	/* osr_complete<1> */
> +	result = xdr_stream_decode_uint32_array(xdr, res->osr_complete, 1);

nfsd4_decode_getdeviceinfo() handles a singleton array be having a
simple u32, and passing its address.  Here you actually define a
singleton array

I'd probably lean to the former style, but if you really like the
latter, maybe we should change nfsd4_decode_getdeviceinfo() ??

Thanks,
NeilBrown

>  struct nfs42_offload_status_res {
>  	struct nfs4_sequence_res	osr_seq_res;
> -	uint64_t			osr_count;
> -	int				osr_status;
> +	u64				osr_count;
> +	int				complete_count;
> +	u32				osr_complete[1];
>  };
>  
>  struct nfs42_copy_notify_args {
> -- 
> 2.46.2
> 
> 
> 





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux