Re: [PATCH v2] btrfs: Correct assignment of pos

2017-07-10 Thread Liu Bo
On Tue, Jul 04, 2017 at 10:33:07PM -0500, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > Assigning pos for usage early messes up in append mode, where > the pos is re-assigned in generic_write_checks(). Assign > pos later to get the correct position to write from iocb->ki_pos. > > Since

Re: [PATCH v2] btrfs: Correct assignment of pos

2017-07-07 Thread David Sterba
On Tue, Jul 04, 2017 at 10:33:07PM -0500, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > Assigning pos for usage early messes up in append mode, where > the pos is re-assigned in generic_write_checks(). Assign > pos later to get the correct position to write from iocb->ki_pos. > > Since

[PATCH v2] btrfs: Correct assignment of pos

2017-07-04 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Assigning pos for usage early messes up in append mode, where the pos is re-assigned in generic_write_checks(). Assign pos later to get the correct position to write from iocb->ki_pos. Since check_can_nocow also uses the value of pos, we shift generic_write_checks() befor