aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew.r.wilcox@intel.com>2015-01-07 11:05:34 -0500
committerJens Axboe <axboe@fb.com>2015-01-13 23:58:11 -0500
commitdd22f551ac0ad366f92f601835f6623b83adc331 (patch)
tree47f6c4f274b3b6989869734b32afdc2e5d85769d /Documentation/filesystems
parentc761d96b079e99d106fa4064e730ef7d0f312f9d (diff)
block: Change direct_access calling convention
In order to support accesses to larger chunks of memory, pass in a 'size' parameter (counted in bytes), and return the amount available at that address. Add a new helper function, bdev_direct_access(), to handle common functionality including partition handling, checking the length requested is positive, checking for the sector being page-aligned, and checking the length of the request does not pass the end of the partition. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Boaz Harrosh <boaz@plexistor.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/xip.txt15
1 files changed, 9 insertions, 6 deletions
diff --git a/Documentation/filesystems/xip.txt b/Documentation/filesystems/xip.txt
index 0466ee569278..b77472949ede 100644
--- a/Documentation/filesystems/xip.txt
+++ b/Documentation/filesystems/xip.txt
@@ -28,12 +28,15 @@ Implementation
28Execute-in-place is implemented in three steps: block device operation, 28Execute-in-place is implemented in three steps: block device operation,
29address space operation, and file operations. 29address space operation, and file operations.
30 30
31A block device operation named direct_access is used to retrieve a 31A block device operation named direct_access is used to translate the
32reference (pointer) to a block on-disk. The reference is supposed to be 32block device sector number to a page frame number (pfn) that identifies
33cpu-addressable, physical address and remain valid until the release operation 33the physical page for the memory. It also returns a kernel virtual
34is performed. A struct block_device reference is used to address the device, 34address that can be used to access the memory.
35and a sector_t argument is used to identify the individual block. As an 35
36alternative, memory technology devices can be used for this. 36The direct_access method takes a 'size' parameter that indicates the
37number of bytes being requested. The function should return the number
38of bytes that can be contiguously accessed at that offset. It may also
39return a negative errno if an error occurs.
37 40
38The block device operation is optional, these block devices support it as of 41The block device operation is optional, these block devices support it as of
39today: 42today: