From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751187AbcIIBUp (ORCPT ); Thu, 8 Sep 2016 21:20:45 -0400 Received: from smtprelay0077.hostedemail.com ([216.40.44.77]:49857 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750787AbcIIBUn (ORCPT ); Thu, 8 Sep 2016 21:20:43 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:960:968:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1381:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:4321:5007:10004:10400:10848:11026:11232:11473:11658:11914:12043:12048:12296:12438:12740:13069:13149:13230:13311:13357:13439:14659:14721:21080:21451:30045:30054:30064:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: hen70_5e2ea51ec140 X-Filterd-Recvd-Size: 1616 Message-ID: <1473384038.13672.23.camel@perches.com> Subject: Re: [PATCH 3/5] nbd: use flags instead of bool From: Joe Perches To: Josef Bacik , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, mpa@pengutronix.de, nbd-general@lists.sourceforge.net Date: Thu, 08 Sep 2016 18:20:38 -0700 In-Reply-To: <1473369130-22986-4-git-send-email-jbacik@fb.com> References: <1473369130-22986-1-git-send-email-jbacik@fb.com> <1473369130-22986-4-git-send-email-jbacik@fb.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.21.91-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-09-08 at 17:12 -0400, Josef Bacik wrote: > In preparation for some future changes, change a few of the state bools over to > normal bits to set/clear properly. [] > diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c [] > @@ -41,8 +41,12 @@ > > #include > > +#define NBD_TIMEDOUT 0 > +#define NBD_DISCONNECT_REQUESTED 1 > + > struct nbd_device { > u32 flags; > + unsigned long runtime_flags; Better to use DECLARE_BITMAP > @@ -626,7 +627,7 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd, > return -EINVAL; > } > > - nbd->disconnect = true; > + set_bit(NBD_DISCONNECT_REQUESTED, &nbd->runtime_flags); And remove the & from runtime_flags here