Re: [PATCH rust-next v2 0/3] rust: miscdevice: add llseek support

Ryosuke Yasuoka
2025-10-16T14:39:37Z

On Thu, Oct 16, 2025 at 01:24:12PM +0200, Greg KH wrote:
> On Thu, Oct 16, 2025 at 07:19:51PM +0900, Ryosuke Yasuoka wrote:
> > On Wed, Oct 15, 2025 at 07:40:12AM +0200, Greg KH wrote:
> > > On Wed, Oct 15, 2025 at 01:02:40PM +0900, Ryosuke Yasuoka wrote:
> > > > Hi all,
> > > >
> > > > This patch series add support for the llseek file operation to misc
> > > > devices written in Rust.
> > >
> > > Cool, but what miscdevice driver needs llseek support? Do you have a
> > > real user for this that we can see as well?
> >
> > Currently no. Because lseek is one of fundamental functions for device
> > driver, I think it's valuable to add support. I believe we'll have real
> > users based on read, write, and this lseek support.
>
> Char devices that use lseek are "odd", don't you agree? There are no
> such current users under drivers/misc/ and only a rare few under
> drivers/char/ (the huge user of that is mem.c but we aren't going to be
> reimplementing that in rust any time soon...)
>
> So without a real user of this api, I suggest we hold-off on adding it.
> Let's not add it until someone comes up with a very valid reason for it.

Thank you for your review and clear explanation.

I understand your point. It makes sense not to add this without real
user. I'll hold off on this and will revisit it if a concrete use case
emerges.

Best regards,
Ryosuke

> thanks,
>
> greg k-h
>