diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/buffer_head.h | 2 | ||||
| -rw-r--r-- | include/linux/fs.h | 44 |
2 files changed, 25 insertions, 21 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 82aa36c53ea7..50cfe8ceb478 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
| @@ -205,6 +205,8 @@ void block_invalidatepage(struct page *page, unsigned long offset); | |||
| 205 | int block_write_full_page(struct page *page, get_block_t *get_block, | 205 | int block_write_full_page(struct page *page, get_block_t *get_block, |
| 206 | struct writeback_control *wbc); | 206 | struct writeback_control *wbc); |
| 207 | int block_read_full_page(struct page*, get_block_t*); | 207 | int block_read_full_page(struct page*, get_block_t*); |
| 208 | int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc, | ||
| 209 | unsigned long from); | ||
| 208 | int block_write_begin(struct file *, struct address_space *, | 210 | int block_write_begin(struct file *, struct address_space *, |
| 209 | loff_t, unsigned, unsigned, | 211 | loff_t, unsigned, unsigned, |
| 210 | struct page **, void **, get_block_t*); | 212 | struct page **, void **, get_block_t*); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 8252b045e624..580b513668fe 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -443,6 +443,27 @@ static inline size_t iov_iter_count(struct iov_iter *i) | |||
| 443 | return i->count; | 443 | return i->count; |
| 444 | } | 444 | } |
| 445 | 445 | ||
| 446 | /* | ||
| 447 | * "descriptor" for what we're up to with a read. | ||
| 448 | * This allows us to use the same read code yet | ||
| 449 | * have multiple different users of the data that | ||
| 450 | * we read from a file. | ||
| 451 | * | ||
| 452 | * The simplest case just copies the data to user | ||
| 453 | * mode. | ||
| 454 | */ | ||
| 455 | typedef struct { | ||
| 456 | size_t written; | ||
| 457 | size_t count; | ||
| 458 | union { | ||
| 459 | char __user *buf; | ||
| 460 | void *data; | ||
| 461 | } arg; | ||
| 462 | int error; | ||
| 463 | } read_descriptor_t; | ||
| 464 | |||
| 465 | typedef int (*read_actor_t)(read_descriptor_t *, struct page *, | ||
| 466 | unsigned long, unsigned long); | ||
| 446 | 467 | ||
| 447 | struct address_space_operations { | 468 | struct address_space_operations { |
| 448 | int (*writepage)(struct page *page, struct writeback_control *wbc); | 469 | int (*writepage)(struct page *page, struct writeback_control *wbc); |
| @@ -484,6 +505,8 @@ struct address_space_operations { | |||
| 484 | int (*migratepage) (struct address_space *, | 505 | int (*migratepage) (struct address_space *, |
| 485 | struct page *, struct page *); | 506 | struct page *, struct page *); |
| 486 | int (*launder_page) (struct page *); | 507 | int (*launder_page) (struct page *); |
| 508 | int (*is_partially_uptodate) (struct page *, read_descriptor_t *, | ||
| 509 | unsigned long); | ||
| 487 | }; | 510 | }; |
| 488 | 511 | ||
| 489 | /* | 512 | /* |
| @@ -1198,27 +1221,6 @@ struct block_device_operations { | |||
| 1198 | struct module *owner; | 1221 | struct module *owner; |
| 1199 | }; | 1222 | }; |
| 1200 | 1223 | ||
| 1201 | /* | ||
| 1202 | * "descriptor" for what we're up to with a read. | ||
| 1203 | * This allows us to use the same read code yet | ||
| 1204 | * have multiple different users of the data that | ||
| 1205 | * we read from a file. | ||
| 1206 | * | ||
| 1207 | * The simplest case just copies the data to user | ||
| 1208 | * mode. | ||
| 1209 | */ | ||
| 1210 | typedef struct { | ||
| 1211 | size_t written; | ||
| 1212 | size_t count; | ||
| 1213 | union { | ||
| 1214 | char __user * buf; | ||
| 1215 | void *data; | ||
| 1216 | } arg; | ||
| 1217 | int error; | ||
| 1218 | } read_descriptor_t; | ||
| 1219 | |||
| 1220 | typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, unsigned long); | ||
| 1221 | |||
| 1222 | /* These macros are for out of kernel modules to test that | 1224 | /* These macros are for out of kernel modules to test that |
| 1223 | * the kernel supports the unlocked_ioctl and compat_ioctl | 1225 | * the kernel supports the unlocked_ioctl and compat_ioctl |
| 1224 | * fields in struct file_operations. */ | 1226 | * fields in struct file_operations. */ |
