Re: [PATCH 3/3] io_uring: add support for getdents

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

 



Hao Xu wrote on Thu, Jul 13, 2023 at 12:05:00PM +0800:
> Yes, like Al pointed out, getdents with an offset is not the right way to do
> it,
> 
> So a way to do seek is a must. But like what I said in the cover-letter, I
> do think the right thing is to
> 
> import lseek/llseek to io_uring, not increment the complex of getdents.

Ok, sorry I hadn't read the cover letter properly


Hao Xu wrote on Thu, Jul 13, 2023 at 12:40:05PM +0800:
> > Ah, I misunderstood your question, sorry. The thing is f_count is
> > init-ed to be 1,
> > 
> > and normal uring requests do fdget first, so I think it's ok for normal
> > requests.
> > 
> > What Christian points out is issue with fixed file, that is indeed a
> > problem I think.
> 
> After re-think of it, I think there is no race in fixed file case as
> well, because the f_count is always >1

Let's remove the if > 1 check then

-- 
Dominique Martinet | Asmadeus



[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