From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752189AbcJIOSO (ORCPT ); Sun, 9 Oct 2016 10:18:14 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58788 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751590AbcJIOSN (ORCPT ); Sun, 9 Oct 2016 10:18:13 -0400 Date: Sun, 9 Oct 2016 16:18:20 +0200 From: Greg Kroah-Hartman To: James Simmons Cc: devel@driverdev.osuosl.org, Andreas Dilger , Oleg Drokin , Linux Kernel Mailing List , Lustre Development List , Henri Doreau , Jinshan Xiong Subject: Re: [PATCH 35/41] staging: lustre: hsm: Use file lease to implement migration Message-ID: <20161009141820.GA10235@kroah.com> References: <1475461717-21631-1-git-send-email-jsimmons@infradead.org> <1475461717-21631-36-git-send-email-jsimmons@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1475461717-21631-36-git-send-email-jsimmons@infradead.org> User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 02, 2016 at 10:28:31PM -0400, James Simmons wrote: > From: Henri Doreau > > Implement non-blocking migration based on exclusive open instead of > group lock. Implemented exclusive close operation to atomically put > a lease, swap two layouts and close a file. This allows race-free > migrations. > > Make the caller responsible for retrying on failure (EBUSY, EAGAIN) > in non-blocking mode. > > In blocking mode, allow applications to trigger layout swaps using a > grouplock they already own, to prevent race conditions between the > actual data copy and the layout swap. Updated lfs accordingly. File > leases are also taken in blocking mode, so that lfs migrate can issue > a warning if an application attempts to open a file that is being > migrated and gets blocked. > > Timestamps (atime/mtime) are set from userland, after the layout swap > is performed, to prevent conflicts with the grouplock. > > lli_trunc_sem is taken/released in the vvp_io layer, under the DLM > lock. This re-ordering fixes the original issue between truncate and > migrate. > > Signed-off-by: Henri Doreau > Signed-off-by: Jinshan Xiong > Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4840 > Reviewed-on: http://review.whamcloud.com/10013 > Reviewed-by: John L. Hammond > Reviewed-by: frank zago > Reviewed-by: Oleg Drokin > Signed-off-by: James Simmons > --- > .../lustre/lustre/include/lustre/lustre_idl.h | 5 +- > .../lustre/lustre/include/lustre/lustre_user.h | 1 + > .../lustre/lustre/include/lustre_req_layout.h | 2 +- > drivers/staging/lustre/lustre/llite/file.c | 231 ++++++++++++-------- > drivers/staging/lustre/lustre/llite/llite_lib.c | 4 - > drivers/staging/lustre/lustre/llite/vvp_io.c | 82 +++++--- > drivers/staging/lustre/lustre/mdc/mdc_lib.c | 34 ++-- > drivers/staging/lustre/lustre/mdc/mdc_request.c | 7 +- > drivers/staging/lustre/lustre/ptlrpc/layout.c | 10 +- > 9 files changed, 235 insertions(+), 141 deletions(-) This patch also failed to apply :(