Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752661AbbDLVa1 (ORCPT ); Sun, 12 Apr 2015 17:30:27 -0400 Received: from down.free-electrons.com ([37.187.137.238]:37636 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752254AbbDLVa0 (ORCPT ); Sun, 12 Apr 2015 17:30:26 -0400 Date: Sun, 12 Apr 2015 23:30:19 +0200 From: Boris Brezillon To: Richard Weinberger Cc: Andrea Scian , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, dedekind1@gmail.com Subject: Re: [PATCH 4/4] UBI: Implement bitrot checking (linux-mtd Digest, Vol 145, Issue 24) Message-ID: <20150412233019.2b4eac3e@bbrezillon> In-Reply-To: <552ADD27.6080703@nod.at> References: <552AA390.3070700@nod.at> <552AD8A6.6000406@dave-tech.it> <552ADD27.6080703@nod.at> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1432 Lines: 37 On Sun, 12 Apr 2015 23:01:27 +0200 Richard Weinberger wrote: > >>>>>> +static struct device_attribute dev_trigger_bitrot_check = > >>>>>> + __ATTR(trigger_bitrot_check, S_IWUSR, NULL, trigger_bitrot_check); > >>>>> > >>>>> How about making this attribute a RW one, so that users could check > >>>>> if there's a bitrot check in progress. > >>>> > >>>> As the check will be initiated only by userspace and writing to the trigger > >>>> while a check is running will return anyway a EBUSY I don't really see > >>>> a point why userspace would check for it. > >>> > >>> Sometime you just want to know whether something is running or not (in > >>> this case the bitrot check) without risking to trigger a new action... > >> > >> Why would they care? > > > > I think is always useful to give some additional information in userspace, from both debugging and diagnostic point of view. > > The question is, why does userspace care? > Other UBI operations are also not visible... Yes, but AFAIK other wear-leveling operations are not directly triggered by user-space. -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/