diff options
author | Christoph Hellwig <hch@lst.de> | 2010-10-06 04:46:53 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-25 21:18:22 -0400 |
commit | e1455d1bdccbe056ba53479741b1452106ce59aa (patch) | |
tree | ed3c4205d7cf72e5ec78e802554178524a368c65 /Documentation/filesystems | |
parent | 8358e7d71e712d3bd4e20ecf23e6fd7480c83684 (diff) |
update block_device_operations documentation
Updated Documentation/filesystems/Locking to match the code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/Locking | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 2db4283efa8d..8a817f656f0a 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -349,21 +349,36 @@ call this method upon the IO completion. | |||
349 | 349 | ||
350 | --------------------------- block_device_operations ----------------------- | 350 | --------------------------- block_device_operations ----------------------- |
351 | prototypes: | 351 | prototypes: |
352 | int (*open) (struct inode *, struct file *); | 352 | int (*open) (struct block_device *, fmode_t); |
353 | int (*release) (struct inode *, struct file *); | 353 | int (*release) (struct gendisk *, fmode_t); |
354 | int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); | 354 | int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); |
355 | int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); | ||
356 | int (*direct_access) (struct block_device *, sector_t, void **, unsigned long *); | ||
355 | int (*media_changed) (struct gendisk *); | 357 | int (*media_changed) (struct gendisk *); |
358 | void (*unlock_native_capacity) (struct gendisk *); | ||
356 | int (*revalidate_disk) (struct gendisk *); | 359 | int (*revalidate_disk) (struct gendisk *); |
360 | int (*getgeo)(struct block_device *, struct hd_geometry *); | ||
361 | void (*swap_slot_free_notify) (struct block_device *, unsigned long); | ||
357 | 362 | ||
358 | locking rules: | 363 | locking rules: |
359 | BKL bd_sem | 364 | BKL bd_mutex |
360 | open: yes yes | 365 | open: no yes |
361 | release: yes yes | 366 | release: no yes |
362 | ioctl: yes no | 367 | ioctl: no no |
368 | compat_ioctl: no no | ||
369 | direct_access: no no | ||
363 | media_changed: no no | 370 | media_changed: no no |
371 | unlock_native_capacity: no no | ||
364 | revalidate_disk: no no | 372 | revalidate_disk: no no |
373 | getgeo: no no | ||
374 | swap_slot_free_notify: no no (see below) | ||
375 | |||
376 | media_changed, unlock_native_capacity and revalidate_disk are called only from | ||
377 | check_disk_change(). | ||
378 | |||
379 | swap_slot_free_notify is called with swap_lock and sometimes the page lock | ||
380 | held. | ||
365 | 381 | ||
366 | The last two are called only from check_disk_change(). | ||
367 | 382 | ||
368 | --------------------------- file_operations ------------------------------- | 383 | --------------------------- file_operations ------------------------------- |
369 | prototypes: | 384 | prototypes: |