---
name: "disk_map_sector_rcu"
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/disk_map_sector_rcu"
---

# disk\_map\_sector\_rcu(9)

map sector to partition

## NAME

disk\_map\_sector\_rcu - map sector to partition

## SYNOPSIS

**struct hd\_struct \* disk\_map\_sector\_rcu(struct gendisk \*** *disk***, sector\_t** *sector***);**

## ARGUMENTS

*disk*

gendisk of interest

*sector*

sector to map

## DESCRIPTION

Find out which partition *sector* maps to on *disk*. This is primarily used for stats accounting.

## CONTEXT

RCU read locked. The returned partition pointer is valid only while preemption is disabled.

## RETURN

Found partition on success, part0 is returned if no partition matches

## COPYRIGHT
