Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4877226imm; Fri, 18 May 2018 12:12:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpBTSZ7qaxofxQwHdMgLuL9iAXHE9wwaSP+Oj8Pa9GJ1yzUgIx4ivB3AtZzHoILUK0n3Mfu X-Received: by 2002:a17:902:59ce:: with SMTP id d14-v6mr10859149plj.253.1526670763305; Fri, 18 May 2018 12:12:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526670763; cv=none; d=google.com; s=arc-20160816; b=PaIzGEBY5bD4sKaxoQDGsfIWdE6bT34bQLIrPwfnvuR2FdAbmK073Ws5SfqHOQhQK3 wrDoibBeQaY1O6QjSzqG2Vo+M6Lkb8ADsJcRNsC2qiuzN8qJigFtoQAXpCNRvhciBZRb 1P+GebESS+Fz+sZJpQJaXS9Qgd+YiQj9kENU18MJ8jBJ7/ky0HDT5Hd2wAy/EZyWmg8P Q3pBdIcoMzY5h2TlgzCOh8rTLJh7/3eAKmHpElSRLrsQSiXj6ujAhe+VBhZkEUR++wPj cYKO/5qCQEn68E9680IRG7D5F5maV5eghAVMgx0ruK1ME0gC1V+xT+de1hw+GBrv13dJ 1DFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=D1lDWtpKPYYpxaYtoB0ZK0E7a56Cxy1d6FjNevqOMds=; b=d5Oq8Tnw2BQh+lRSnwflHossVNKzajPItqz+M+t/uEoIHhpZtLK14L7t4TMZoVsE2L WB9A0GDC3bVsOCSZTGerDxuaCQAwKWSjMNWp9A0mRfHkTg4lYhiTYBIp9YlX/K+/z2VV Qez891DBq4Z249nsXiUzTC5s2Wyk0CoiSNjjhtQwYzArOF1d/B95mv9tf9YargAhB8gG egRgv0aiiXZOeKy3+NK2GX3WdboUWbMvp77GL4exjcnsWoNZMbHp9fWnxF8oV+fUuqVs k1RhlsrqrYuYaJEOzmauSCERezcC/BTM3oAyaFQNNsylUTU3rBPbE9ztgfKIPNOpBM40 m3EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ggXr1R2J; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i4-v6si6398096pgq.405.2018.05.18.12.12.28; Fri, 18 May 2018 12:12:43 -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=pass header.i=@gmail.com header.s=20161025 header.b=ggXr1R2J; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752295AbeERTKw (ORCPT + 99 others); Fri, 18 May 2018 15:10:52 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:38345 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752030AbeERTKp (ORCPT ); Fri, 18 May 2018 15:10:45 -0400 Received: by mail-qk0-f196.google.com with SMTP id b39-v6so7287770qkb.5; Fri, 18 May 2018 12:10:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=D1lDWtpKPYYpxaYtoB0ZK0E7a56Cxy1d6FjNevqOMds=; b=ggXr1R2JyAWrUUYxhfcp0XH2bi4lDSZhfitICmzWjYOslDtmarpct05PwvKtgxFqzv 2Libmr9IV32MnGzEcHFQlPvv578co+wkDHXhaTmOtO+eZiu1ORoKpmn7tu704U+7AU2O lmCpJo/zFBULaAGBSgz2KF2jvYqFKR5gr6cN6+zMU8kLK89vIkp3h7Rs4Dh88RuwLuNU aCOIz4gDkCmPDR0IPsV/Fsoi8bsN+DtsmpVXInOGfkvO0njxlkwhfNzKPxD7eh+2aIgb jQ9gkM+eyB2SJAdlfi6x6aVx8YVUF/+Hi6Roy0eSghjvBT+yn0xoSC0M7M1imPjLU6YJ 3WlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=D1lDWtpKPYYpxaYtoB0ZK0E7a56Cxy1d6FjNevqOMds=; b=pH0y4yz7FlCcyrDvCkEvb6RdnOa71mcnudDV8lLwGHl/xP8XeacnyUWZrtBmoJSdmD UPBAs2+9H10P/9/Hj9Pj5mT7+9h0kTd9zLU14VvkpntfE9PF0ob/SIdzzZWJsmIq4JIw OCcFdxxHkxh+oP9LQL5ShlQ3+Yw7V1rhsbkhem3l2O+qqGKxO0g2YiOqVrgfBUaAz2mt loPV+tNlNID254tcy+kvJXlnMgEEDI/YJNqcTSgBzEr+2w7glEln1rcgdvRtTCqPFu46 txcPtzfnx1cRGviXDWSlEUWeXXQtRkNyeJMZIZEMpiW6iRtmmrxzx7ddEVF7ULTTujEU ZWrQ== X-Gm-Message-State: ALKqPwdzmSSQWGa3QxToukTG9WkFmnqLtLL2GO/RwT3n1Q00A6ToILeb d9sTLgzgOc0zStseyUSyxQ== X-Received: by 2002:a37:c64f:: with SMTP id b76-v6mr9543806qkj.368.1526670644536; Fri, 18 May 2018 12:10:44 -0700 (PDT) Received: from kmo-pixel (c-71-234-172-214.hsd1.vt.comcast.net. [71.234.172.214]) by smtp.gmail.com with ESMTPSA id m25-v6sm3514913qki.41.2018.05.18.12.10.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 May 2018 12:10:43 -0700 (PDT) Date: Fri, 18 May 2018 15:10:40 -0400 From: Kent Overstreet To: Andreas Dilger Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Andrew Morton , Dave Chinner , darrick.wong@oracle.com, tytso@mit.edu, linux-btrfs@vger.kernel.org, clm@fb.com, jbacik@fb.com, viro@zeniv.linux.org.uk, willy@infradead.org, peterz@infradead.org Subject: Re: [PATCH 10/10] Dynamic fault injection Message-ID: <20180518191040.GG31737@kmo-pixel> References: <20180518074918.13816-1-kent.overstreet@gmail.com> <20180518074918.13816-21-kent.overstreet@gmail.com> <905DA1CC-63F8-4020-A1D7-1F59ABDF3448@dilger.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <905DA1CC-63F8-4020-A1D7-1F59ABDF3448@dilger.ca> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 18, 2018 at 01:05:20PM -0600, Andreas Dilger wrote: > On May 18, 2018, at 1:49 AM, Kent Overstreet wrote: > > > > Signed-off-by: Kent Overstreet > > I agree with Christoph that even if there was some explanation in the cover > letter, there should be something at least as good in the patch itself. The > cover letter is not saved, but the commit stays around forever, and should > explain how this should be added to code, and how to use it from userspace. > > > That said, I think this is a useful functionality. We have something similar > in Lustre (OBD_FAIL_CHECK() and friends) that is necessary for being able to > test a distributed filesystem, which is just a CPP macro with an unlikely() > branch, while this looks more sophisticated. This looks like it has some > added functionality like having more than one fault enabled at a time. > If this lands we could likely switch our code over to using this. This is pretty much what I was looking for, I just wanted to know if this patch was interesting enough to anyone that I should spend more time on it or just drop it :) Agreed on documentation. I think it's also worth factoring out the functionality for the elf section trick that dynamic debug uses too. > Some things that are missing from this patch that is in our code: > > - in addition to the basic "enabled" and "oneshot" mechanisms, we have: > - timeout: sleep for N msec to simulate network/disk/locking delays > - race: wait with one thread until a second thread hits matching check > > We also have a "fail_val" that allows making the check conditional (e.g. > only operation on server "N" should fail, only RPC opcode "N", etc). Those all sound like good ideas... fail_val especially, I think with that we'd have all the functionality the existing fault injection framework has (which is way to heavyweight to actually get used, imo)