| To: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] libxfs: remove never-read "offset" assignment in readbufr_map & writebufr |
| From: | Mark Tinguely <tinguely@xxxxxxx> |
| Date: | Wed, 09 Apr 2014 15:59:25 -0500 |
| Cc: | xfs-oss <xfs@xxxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <53459D9A.1040707@xxxxxxxxxxx> |
| References: | <53459D9A.1040707@xxxxxxxxxxx> |
| User-agent: | Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0 |
On 04/09/14 14:20, Eric Sandeen wrote: libxfs_readbufr_map()& libxfs_writebufr() iterate over bp->b_map[] and read each chunk. The loops start out correctly, getting the offset from bm_bn and the length from bm_len. After the IO it correctly advances the target buffer pointer by len, but then inexplicably advances "offset" by len as well. The whole point of this exercise is to handle discontiguous ranges - marching offset along by length of IO done is incorrect. Thankfully offset is immediately reset to the proper value again at the top of the loop for the next range, so this is harmless, other than being confusing. Signed-off-by: Eric Sandeen<sandeen@xxxxxxxxxx> Looks good. Reviewed-by: Mark Tinguely <tinguely@xxxxxxx> |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] xfs_io: fix random pread/pwrite to honor offset, Eric Sandeen |
|---|---|
| Next by Date: | [PATCH] xfsprogs: fix xfs_logprint EFI entry split on log buffer, Mark Tinguely |
| Previous by Thread: | [PATCH] libxfs: remove never-read "offset" assignment in readbufr_map & writebufr, Eric Sandeen |
| Next by Thread: | [PATCH v2 0/2] xfs: tmpfile fixes for inode security/acl, Brian Foster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |