Re: [PATCHv5 09/11] ublk: zc register/unregister bvec

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

 



On Tue, Feb 25, 2025 at 09:35:30AM -0700, Keith Busch wrote:
> On Tue, Feb 25, 2025 at 07:00:05PM +0800, Ming Lei wrote:
> > On Mon, Feb 24, 2025 at 01:31:14PM -0800, Keith Busch wrote:
> > >  static inline bool ublk_dev_is_user_copy(const struct ublk_device *ub)
> > >  {
> > > -	return ub->dev_info.flags & UBLK_F_USER_COPY;
> > > +	return ub->dev_info.flags & (UBLK_F_USER_COPY | UBLK_F_SUPPORT_ZERO_COPY);
> > >  }
> > 
> > I'd suggest to set UBLK_F_USER_COPY explicitly either from userspace or
> > kernel side.
> > 
> > One reason is that UBLK_F_UNPRIVILEGED_DEV mode can't work for both.
> 
> In my reference implementation using ublksrv, I had the userspace
> explicitly setting F_USER_COPY automatically if zero copy was requested.
> Is that what you mean? Or do you need the kernel side to set both flags
> if zero copy is requested too?

Then the driver side has to validate the setting, and fail ZERO_COPY if
F_USER_COPY isn't set.

> 
> I actually have a newer diff for ublksrv making use of the SQE links.
> I'll send that out with the next update since it looks like there will
> need to be at least one more version.
> 
> Relevant part from the cover letter,
> https://lore.kernel.org/io-uring/20250203154517.937623-1-kbusch@xxxxxxxx/

OK, I will try to cook a ublk selftest in kernel tree so that the
cross-subsystem change can be covered a bit easier.



Thanks,
Ming





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux