Message ID | 20200819221956.845195-2-vgoyal@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=6VBt=B5=vger.kernel.org=linux-fsdevel-owner@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4790715E4 for <patchwork-linux-fsdevel@patchwork.kernel.org>; Wed, 19 Aug 2020 22:23:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2DFAC20888 for <patchwork-linux-fsdevel@patchwork.kernel.org>; Wed, 19 Aug 2020 22:23:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QCvHdkv7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727888AbgHSWXB (ORCPT <rfc822;patchwork-linux-fsdevel@patchwork.kernel.org>); Wed, 19 Aug 2020 18:23:01 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:41725 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727878AbgHSWVH (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>); Wed, 19 Aug 2020 18:21:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597875666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+4JPYlZ9QDYDC/mD0F6lPDwdYttMSKvhVad1UZeeChA=; b=QCvHdkv71lb2bdFhO1lyKnus7D7uXAej5V93BRHiIVnNxFVv0/N7UGTVl88mcvDWAJ67jx 26rIYlCLWH/+wDoxbZyQNF1hW1W9fqJ7XOySJJqCvrmf12257BVCCIU5ImolR78NmvaYdk Dnj8m55Z7fXKZlfziTepcqE8I0l+7hM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-79-mzDGoN68MzeM2JWyxMOSZw-1; Wed, 19 Aug 2020 18:21:02 -0400 X-MC-Unique: mzDGoN68MzeM2JWyxMOSZw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E05028030A1; Wed, 19 Aug 2020 22:21:00 +0000 (UTC) Received: from horse.redhat.com (ovpn-115-197.rdu2.redhat.com [10.10.115.197]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3B0A35C88D; Wed, 19 Aug 2020 22:20:54 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id C68142254FA; Wed, 19 Aug 2020 18:20:53 -0400 (EDT) From: Vivek Goyal <vgoyal@redhat.com> To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, virtio-fs@redhat.com Cc: vgoyal@redhat.com, miklos@szeredi.hu, stefanha@redhat.com, dgilbert@redhat.com, dan.j.williams@intel.com, Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@infradead.org>, Vishal L Verma <vishal.l.verma@intel.com>, "Weiny, Ira" <ira.weiny@intel.com> Subject: [PATCH v3 01/18] dax: Modify bdev_dax_pgoff() to handle NULL bdev Date: Wed, 19 Aug 2020 18:19:39 -0400 Message-Id: <20200819221956.845195-2-vgoyal@redhat.com> In-Reply-To: <20200819221956.845195-1-vgoyal@redhat.com> References: <20200819221956.845195-1-vgoyal@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-fsdevel.vger.kernel.org> X-Mailing-List: linux-fsdevel@vger.kernel.org |
Series |
virtiofs: Add DAX support
|
expand
|
diff --git a/drivers/dax/super.c b/drivers/dax/super.c index c82cbcb64202..505165752d8f 100644 --- a/drivers/dax/super.c +++ b/drivers/dax/super.c @@ -46,7 +46,8 @@ EXPORT_SYMBOL_GPL(dax_read_unlock); int bdev_dax_pgoff(struct block_device *bdev, sector_t sector, size_t size, pgoff_t *pgoff) { - phys_addr_t phys_off = (get_start_sect(bdev) + sector) * 512; + sector_t start_sect = bdev ? get_start_sect(bdev) : 0; + phys_addr_t phys_off = (start_sect + sector) * 512; if (pgoff) *pgoff = PHYS_PFN(phys_off);