On Mon, Aug 04, 2014 at 10:48:28PM -0400, Theodore Ts'o wrote: > Ok, do the following: > > git clone -b retry-write git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git > e2fsprogs-retry > >
I had a look at the code just a few lines after your change, and something
struck me. The code starts at line 258:
258 while (size > 0) {
259 if (size < channel->block_size) {
260 actual = read(data->dev, data->bounce,
261 channel->block_size);
262 if (actual != channel->block_size) {
263 retval = EXT2_ET_SHORT_READ;
264 goto error_out;
265 }
266 }
267 actual = size;
268 if (size > channel->block_size)
269 actual = channel->block_size;
270 memcpy(data->bounce, buf, actual);
271 actual = write(data->dev, data->bounce,
channel->block_size);
272 if (actual != channel->block_size)
273 goto short_write;
274 size -= actual;
275 buf += actual;
276 }
Now - I have no idea, if the buffer/size is aligned, but if it is not, then the
issue might repeat.
Should the same retry patch be put here, somwhere around line 272?
BR,
M.W.
signature.asc
Description: Digital signature

