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

# unmap\_mapping\_range(9)

unmap the portion of all mmaps in the specified address\_space corresponding to the specified page range in the underlying file.

## NAME

unmap\_mapping\_range - unmap the portion of all mmaps in the specified address\_space corresponding to the specified page range in the underlying file.

## SYNOPSIS

**void unmap\_mapping\_range(struct address\_space \*** *mapping***, loff\_t const** *holebegin***, loff\_t const** *holelen***, int** *even\_cows***);**

## ARGUMENTS

*mapping*

the address space containing mmaps to be unmapped.

*holebegin*

byte in first page to unmap, relative to the start of the underlying file. This will be rounded down to a PAGE\_SIZE boundary. Note that this is different from **truncate\_pagecache**, which must keep the partial page. In contrast, we must get rid of partial pages.

*holelen*

size of prospective hole in bytes. This will be rounded up to a PAGE\_SIZE boundary. A holelen of zero truncates to the end of the file.

*even\_cows*

1 when truncating a file, unmap even private COWed pages; but 0 when invalidating pagecache, don't throw away private data.

## COPYRIGHT
