From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752293AbbCZLXP (ORCPT ); Thu, 26 Mar 2015 07:23:15 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:56698 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751888AbbCZLXN (ORCPT ); Thu, 26 Mar 2015 07:23:13 -0400 X-IronPort-AV: E=Sophos;i="5.11,471,1422921600"; d="scan'208";a="248560267" Message-ID: <5513EC1E.5090601@citrix.com> Date: Thu, 26 Mar 2015 12:23:10 +0100 From: =?windows-1252?Q?Roger_Pau_Monn=E9?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Tao Chen , CC: , , , Subject: Re: [PATCH] xen-blkback: enlarge the array size of blkback name References: <1426261941-32424-1-git-send-email-boby.chen@huawei.com> In-Reply-To: <1426261941-32424-1-git-send-email-boby.chen@huawei.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org El 13/03/15 a les 16.52, Tao Chen ha escrit: > The blkback name is like blkback.domid.xvd[a-z], if domid has three digits > (means larger than 100), then the backmost xvd wouldn't be fully shown. > > Define a BLKBACK_NAME_LEN macro which is (TASK_COMM_LEN * 2), enlarge the > array size of blkback name, so it will be fully shown in any case. > > Signed-off-by: Tao Chen > --- > drivers/block/xen-blkback/xenbus.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c > index e3afe97..0289e21 100644 > --- a/drivers/block/xen-blkback/xenbus.c > +++ b/drivers/block/xen-blkback/xenbus.c > @@ -21,6 +21,9 @@ > #include > #include "common.h" > > +/* Enlarge the array size in order to fully show blkback name. */ > +#define BLKBACK_NAME_LEN (TASK_COMM_LEN * 2) Any reason to use TASK_COMM_LEN instead of just coding it to 17? Or maybe 20 to be on the safe side? Roger.