[Devel] [PATCH RHEL7 COMMIT] ploop: pio_nfs does not require PLOOP_REQ_ISSUE_FLUSH (v2)

Konstantin Khorenko khorenko at virtuozzo.com
Wed Dec 7 07:31:36 PST 2016


Please check if it's needed for PCS6.

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team

On 12/06/2016 02:48 PM, Konstantin Khorenko wrote:
> The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.20.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
> after rh7-3.10.0-327.36.1.vz7.20.11
> ------>
> commit cc3748db2c17d5805d9568d774cfe63b41195258
> Author: Maxim Patlasov <mpatlasov at virtuozzo.com>
> Date:   Tue Dec 6 15:48:22 2016 +0400
>
>     ploop: pio_nfs does not require PLOOP_REQ_ISSUE_FLUSH (v2)
>
>     The flag was introduced for local case: if we modify local
>     block-device directly, bypassing ext4, we cannot rely on
>     fsync() and must flush the device explicitly. It is not the
>     case for pio_nfs, so it's not necessary to set
>     PLOOP_REQ_ISSUE_FLUSH.
>
>     The patch is important because pio_nfs doesn't provide
>     issue_flush method.
>
>     Changed in v2:
>      - rebase: after 34c7bf1755 moved set_bit and nullifying submit into
>        ploop_entry_nullify_req(), the patch to be applied to this new
>        place.
>
>     Signed-off-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
> ---
>  drivers/block/ploop/dev.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
> index 5aacd2a..eaf48c2 100644
> --- a/drivers/block/ploop/dev.c
> +++ b/drivers/block/ploop/dev.c
> @@ -2037,9 +2037,11 @@ ploop_entry_nullify_req(struct ploop_request *preq)
>  	 * (see dio_submit()). So fsync of EXT4 image doesnt help us.
>  	 * We need to force sync of nullified blocks.
>  	 */
> +	if (top_delta->io.ops->issue_flush) {
> +		preq->eng_io = &top_delta->io;
> +		set_bit(PLOOP_REQ_ISSUE_FLUSH, &preq->state);
> +	}
>
> -	preq->eng_io = &top_delta->io;
> -	set_bit(PLOOP_REQ_ISSUE_FLUSH, &preq->state);
>  	top_delta->io.ops->submit(&top_delta->io, preq, preq->req_rw,
>  				  &sbl, preq->iblock, 1<<plo->cluster_log);
>  	return 0;
> .
>


More information about the Devel mailing list