Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2338617imm; Thu, 9 Aug 2018 11:07:26 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzVxFN4uf+RhHzJriXHkCIWMRWcY7ojyB65RCorf9Zv/jHKEV3mRERBNxOmom3h9WCA5LOo X-Received: by 2002:a63:ee56:: with SMTP id n22-v6mr3006364pgk.402.1533838046281; Thu, 09 Aug 2018 11:07:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533838046; cv=none; d=google.com; s=arc-20160816; b=UgqVFj3/JuyFV4FauxbHbR6yuyzmDoJ/fEu24gtbDclysT+NxJhrrIKtC+gI5Kii7p hbSb8A9m81kD6TFenAooAmKojk0E0JWiw611HPajNpC0bM9L3wds4uX4G6PJWZN8zE5M 7LMSivQSQY5NCFBk3gM80Qcz2fPCvi86khQc4NrXuscxoxxIYXZc8PlJ+Nl5rg29zE9d 6yXwCu7hiSoG3Wc+MLgPV7WSaZpTiU5nT5jk2ckfEiTyF8PQAJKitM9IDh2r7Unkfjia OkhpnP/DPh+BwZwpgK6F0uYzo+7X2IvcXO00S0JtZtPYcEXnYr2rrY7VFwQv0P9lCG7k 0Gcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=NrqZh18qx3DHoiPixKO4KdHKXt6/Ehm+nt6+jgONI1w=; b=tItRGwOC+YxHGFU66dCchUnMRZZ95SOdPwKohw+/hsnkNgrWAFczxSOb3fK08GMVao wiR97RFMIdRBcY6aCnSauBSUUPsgBFSMZKAxJAaVTMeJiSXmm4z3cj7ClSwk0srUZ3FH PWfyyz+fHNa7Wvg2MXjYsOz6g++0iup2XiIjyB8o5icVIY95meb39GJL33ePJHhA+egT youmFCH6k6Pt0mcQ7zmXqaxUC4GZi+G5/jkGM+ImpwIhGH+1hbRP9Dz5rNt8XiRFv2lm Yja3A3iXRBPLj2iOVhFO0UbURd67hGcJOYK1tT8fzjfeWJ6zwnO8oyoCZfBwyfjNLdWH W+hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=IrhVm3gP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15-v6si7981872pgg.611.2018.08.09.11.07.11; Thu, 09 Aug 2018 11:07:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=IrhVm3gP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727342AbeHIUcF (ORCPT + 99 others); Thu, 9 Aug 2018 16:32:05 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:45242 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726944AbeHIUcE (ORCPT ); Thu, 9 Aug 2018 16:32:04 -0400 Received: by mail-pl0-f66.google.com with SMTP id j8-v6so2862832pll.12; Thu, 09 Aug 2018 11:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=NrqZh18qx3DHoiPixKO4KdHKXt6/Ehm+nt6+jgONI1w=; b=IrhVm3gPnOLyn0d4y9klzRiHMVOKLpQGD9mQx71AtZXKn4VHxeMyBrMdvXWlcCVZQ6 o4giP3iamqlC+znVvN6xiB5aKPb33OI4+p47PzJYIrwz6c3RudrLPHQWFur9B5ND3LRo rVYhsTYQxoLlBDtQ7I1OpzeiIJTZnqZV6vZ3joTboMm/HfHuuAC34Po7/vcAuVkVBqbh ygTR0kxNMfC7IRoCD+oJxqCSi05QYuXI0NkQ6AYhDuQHV8DjuGwMW1QvopxYOGFwWmy4 TtS+KyauBxrcBGshQtVMuG3Hr6l3e3A/hxkZKCTm3+ShCidFXxqivtOkxE/BKyGlWdNw YbGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=NrqZh18qx3DHoiPixKO4KdHKXt6/Ehm+nt6+jgONI1w=; b=KzF3xTPLu1j0VSWuo7TPrSrpaM+fbaBf0BR5SiqQ/JdoOCvtD8/Zxpf5AHyx64fjq6 CKsvrHWbnkuFZX7+UhXDSn4CHR1vswhfVyAypOlrxl+7LjTX24OeX76fdhjP76y005I8 t7FvDE2yObN0lvlkmBHfpkMBwXxkN3pKiETW1+H5jkv7fGh8Wqav1GMgRTvr/c10/i1y OHfoj8zE9YhINw2YmeWZ12IVkXo3cgrpDi3Z80JXJ7A9E68xXrj+X6bpK7LTUUFETVF4 Y2rwwwUQcvASpPhe+ZkEcCp71A0OIU89eLDOjESZb0r6y1Onb+KnJdfUlH/ynY4G4osi dRRw== X-Gm-Message-State: AOUpUlEHKJtrX13m6YpHeoYOdeYuJYZYTLzmvhVXkFz60+wfJlQJQLKT OZ/4tc2PJ6sF6fAqiumy5ZE= X-Received: by 2002:a17:902:925:: with SMTP id 34-v6mr2947097plm.307.1533837965120; Thu, 09 Aug 2018 11:06:05 -0700 (PDT) Received: from localhost (h101-111-148-072.catv02.itscom.jp. [101.111.148.72]) by smtp.gmail.com with ESMTPSA id 75-v6sm15976310pfr.115.2018.08.09.11.06.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Aug 2018 11:06:04 -0700 (PDT) From: Naohiro Aota To: David Sterba , linux-btrfs@vger.kernel.org Cc: Chris Mason , Josef Bacik , linux-kernel@vger.kernel.org, Hannes Reinecke , Damien Le Moal , Bart Van Assche , Matias Bjorling , Naohiro Aota Subject: [RFC PATCH 07/17] btrfs: disable device replace in HMZONED mode Date: Fri, 10 Aug 2018 03:04:40 +0900 Message-Id: <20180809180450.5091-8-naota@elisp.net> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180809180450.5091-1-naota@elisp.net> References: <20180809180450.5091-1-naota@elisp.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To enable device replacing feature in HMZONED mode, we should avoid write replicating from replace source device to replace target device so that we do not write to a location after the position of a zone's device write pointer. In addition, scrub process should be modified to dispatch the write I/Os sequentially and to fill holes between the extents. Finally, write pointers of the zones should be synchronized to match with RAID siblings in a RAID case. It needs more works to solve all these issues. So disable the device replace feature in HMZONED mode for now. Signed-off-by: Naohiro Aota --- fs/btrfs/dev-replace.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index 839a35008fd8..cde61fb217db 100644 --- a/fs/btrfs/dev-replace.c +++ b/fs/btrfs/dev-replace.c @@ -416,6 +416,9 @@ int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info, struct btrfs_device *tgt_device = NULL; struct btrfs_device *src_device = NULL; + if (btrfs_fs_incompat(fs_info, HMZONED)) + return -EOPNOTSUPP; + ret = btrfs_find_device_by_devspec(fs_info, srcdevid, srcdev_name, &src_device); if (ret) -- 2.18.0