Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1227020rwr; Wed, 3 May 2023 11:54:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7BjUAhOU4EXecectgfgZr4/MGK7GZmCS86e32ToJmvevq7zyaq1blh8XMW8LnKIBLbxJNp X-Received: by 2002:a17:90b:785:b0:23f:962e:825d with SMTP id l5-20020a17090b078500b0023f962e825dmr3693405pjz.1.1683140083061; Wed, 03 May 2023 11:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683140083; cv=none; d=google.com; s=arc-20160816; b=vDC5cH8FNzcWPwH8NvzT4/lR9eP2vIaF1KaDy+Y3KWbrO7ukOe/fH8vw1vhp293xLl 7ZIAKFJtFE3+yeJdy/2HnWLfT6L5d6Uygr3CHzCndzP02wsCIsQAh6qjxukKNGJHGFTx zT08lYBAQjJcMJP2wCC2Bs3LfctlPkjr5waexU+UkI27D+s9kk+t58rOOYyIYAHdDZfw areWcD7GYrIxqSV+IuFUYM/+U9FLj2wYgunfMqQlPMYejlEE36ITbraE5L1TV1dDsTao lazoQ0PEDpcNlSX2gTeBoTc/4wZ0gaBRvKD79obTDkjcSzufByIzrTmt8dvMlcyVeJjw zClw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=5FYuBoy706BNjZQW8G4Brm2K3CMMFujMy+1qdI/x7nE=; b=dw/8IevCrSwPK+yr4U1aUDGKC3yF2fVSeIIbLvRpfHNiCDh2FlIivdRsUR/erfZhL6 JD8OFHbGNv6KO0RmaLeYgqm2T3eE98pPwuPCAW4llMQob9XwoV8yC5Fh2drWgca66vUu ExdJ4o8pKQCGkRuifgBdfxpXbT1V3kQxtlzwrxt993kEiS5xLMI9oSloKtqWrMdAMoSy S4C+S1Vr2cSx/4aayJ/DBbPSc8PbucLUv12p7tEI2hpC76kDQyUWE3JsHolh6bfN5QNe A+beOmiNI4itXF4TcmEOpMTnVs8u5GMY0ApubrQSrxAukJg2a6Or+KKtFyixf+9jYo6p 7u2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bb11-20020a17090b008b00b0024711d63febsi2019105pjb.173.2023.05.03.11.54.31; Wed, 03 May 2023 11:54:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229946AbjECSuj (ORCPT + 99 others); Wed, 3 May 2023 14:50:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229904AbjECSu0 (ORCPT ); Wed, 3 May 2023 14:50:26 -0400 Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5A8259F9; Wed, 3 May 2023 11:50:01 -0700 (PDT) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-64115e652eeso7200389b3a.0; Wed, 03 May 2023 11:50:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683139800; x=1685731800; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5FYuBoy706BNjZQW8G4Brm2K3CMMFujMy+1qdI/x7nE=; b=f/5Pm3fuK+SUBJ1KqY4XsCc7rM+zRqsH1mTszfjprKI6j7t23pMn1xaAqtgmCLjZDU yV4ngDG2moljs0LpJ3IHLcJW6hZqX73zQ31e3NtuUpHwI5P0g9dTj0u9fqWGKCHaGBwa SKmpdgj4+/A70XBhzfDPDQJlSuVZ1RbPuoK21SaQjh52YV1Q8FYAaktkoaECWkpSzBxZ fgsCEPLUJx0Bb0xL6y454XslUmEAorD7EDfSmddSi3VtOIjiPaqsq3DqmaAzSABRxr/f wFnjOqt7NPJw5GsRrPa32eXHTCImz/k0vSnDXy2ySvuT/2esUAGSYo0mzk/dfR9Zs2iw mw0A== X-Gm-Message-State: AC+VfDwshLLZUuOgyR6sI78CZJMoh2d3nSOUAabzGq0KOJBmWWLle6Zm doAnhlrXK4kxyHd1chohWt8= X-Received: by 2002:a05:6a20:12c4:b0:ee:cc76:5023 with SMTP id v4-20020a056a2012c400b000eecc765023mr3789944pzg.22.1683139799941; Wed, 03 May 2023 11:49:59 -0700 (PDT) Received: from ?IPV6:2620:15c:211:201:c683:a90b:5f41:5878? ([2620:15c:211:201:c683:a90b:5f41:5878]) by smtp.gmail.com with ESMTPSA id t3-20020a056a00138300b006338e0a9728sm23946563pfg.109.2023.05.03.11.49.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 May 2023 11:49:59 -0700 (PDT) Message-ID: Date: Wed, 3 May 2023 11:49:56 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH RFC 16/16] nvme: Support atomic writes Content-Language: en-US To: John Garry , axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, martin.petersen@oracle.com, djwong@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, dchinner@redhat.com, jejb@linux.ibm.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, Alan Adamson References: <20230503183821.1473305-1-john.g.garry@oracle.com> <20230503183821.1473305-17-john.g.garry@oracle.com> From: Bart Van Assche In-Reply-To: <20230503183821.1473305-17-john.g.garry@oracle.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/3/23 11:38, John Garry wrote: > + if (!(boundary & (boundary - 1))) { Please use is_power_of_2() instead of open-coding it. Thanks, Bart.