From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755924AbbCMBKd (ORCPT ); Thu, 12 Mar 2015 21:10:33 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:42727 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752589AbbCMBK3 (ORCPT ); Thu, 12 Mar 2015 21:10:29 -0400 Date: Fri, 13 Mar 2015 10:10:35 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Sergey Senozhatsky , Andrew Morton , Nitin Gupta , linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: Re: [PATCHv2 7/7] zram: deprecate zram attrs sysfs nodes Message-ID: <20150313011035.GA1901@swordfish> References: <1426171638-18209-1-git-send-email-sergey.senozhatsky@gmail.com> <1426171638-18209-8-git-send-email-sergey.senozhatsky@gmail.com> <20150312235547.GA15607@blaptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150312235547.GA15607@blaptop> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Minchan, On (03/13/15 08:55), Minchan Kim wrote: > How about adding pid, comm? Admin can know which process touches. > ok. > > struct zram *zram = dev_to_zram(d); \ > > + \ > > + deprecated_attr_warn(__stringify(name)); \ > > It just reports once for first-touched stat and miss other stats by ZRAM_ATTR_RO. > Of course, you warned "See zram documentation" so he might know about other stats > plan, too. If it's your intention, let's make warn more clear. > yes, we have a "go and read docs" warning. documentation explains it in details. so I think one warning is enough. > "Atrribute $s will be removed. Also, there are other stats we will remove > in future. See Documentation/blockdev/zram.txt" > I didn't want it to be tooooooooooooooo long (and still don't want). "Documentation/blockdev/zram.txt" is not a path which a regular user can just copy-paste and use to access the documentation. so I'd prefer to keep it as "See zram documentation". How about this? (well, a multi-line string.) --- drivers/block/zram/zram_drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 2aced91..7f19196 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -49,7 +49,10 @@ static unsigned int num_devices = 1; static inline void deprecated_attr_warn(const char *name) { - pr_warn_once("Attribute %s will be removed. See zram documentation.\n", + pr_warn_once("%d (%s): Attribute %s (and others) will be removed. " + "See zram documentation.\n", + task_pid_nr(current), + current->comm, name); }