---
name: "bdev_direct_access"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/bdev_direct_access"
---

# bdev\_direct\_access(9)

Get the address for directly-accessibly memory

## NAME

bdev\_direct\_access - Get the address for directly-accessibly memory

## SYNOPSIS

**long bdev\_direct\_access(struct block\_device \*** *bdev***, struct blk\_dax\_ctl \*** *dax***);**

## ARGUMENTS

*bdev*

The device containing the memory

*dax*

control and output parameters for -\>direct\_access

## DESCRIPTION

If a block device is made up of directly addressable memory, this function will tell the caller the PFN and the address of the memory. The address may be directly dereferenced within the kernel without the need to call **ioremap**, **kmap** or similar. The PFN is suitable for inserting into page tables.

## RETURN

negative errno if an error occurs, otherwise the number of bytes accessible at this address.

## COPYRIGHT
