Re: [PATCH] svcrdma: fix offset calculation for non-page aligned sge entries

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

 



On Thu, 3 Apr 2014 12:43:00 +0300
Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote:

> On 03/12/2014 11:18 PM, Jeff Layton wrote:
> > 
> > Ok, I may need to rejigger that logic to account for that case. I'll do
> > that and send a v2 once I test it out...
> > 
> 
> Hi Jeff in obj-layout we have this code:
> 
> 	if (*p_pgbase > PAGE_SIZE) {
> 		dprintk("%s: pgbase(0x%x) > PAGE_SIZE\n", __func__, *p_pgbase);
> 		*p_pages += *p_pgbase >> PAGE_SHIFT;
> 		*p_pgbase &= ~PAGE_MASK;
> 	}
> 
> ie. advance the page_array pointer and keep the pgbase within page.
> 
> if I recall correctly this case happens when you return a short read/write
> then the retry comes again with same page_array but with base jumping over
> the previous short IO, and length with the reminder.
> 
> I'm not sure what is the code path that feeds your xdr stuff but it
> might not filter out the way we do in obj-lo. the ORE is the same
> it assumes pgbase < PAGE_SIZE.
> 
> Cheers
> Boaz
> 

Thanks Boaz,

After I had a fresh look at the logic in dma_map_xdr(), I figured out
that the logic in there should cover all of the cases we care about. It
was just the the page_base wasn't being respected. The updated patch is
this one-liner that I sent to the list:

     [PATCH v2] svcrdma: fix offset calculation for non-page aligned sge entries

That seems to fix the broken testcase that I had, which was that
sub-page DIO reads would get corrupted. Does that patch look ok to you,
or have I missed any cases?

-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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