aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-10-06 04:46:53 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-10-25 21:18:22 -0400
commite1455d1bdccbe056ba53479741b1452106ce59aa (patch)
treeed3c4205d7cf72e5ec78e802554178524a368c65 /Documentation
parent8358e7d71e712d3bd4e20ecf23e6fd7480c83684 (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')
-rw-r--r--Documentation/filesystems/Locking31
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 -----------------------
351prototypes: 351prototypes:
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
358locking rules: 363locking rules:
359 BKL bd_sem 364 BKL bd_mutex
360open: yes yes 365open: no yes
361release: yes yes 366release: no yes
362ioctl: yes no 367ioctl: no no
368compat_ioctl: no no
369direct_access: no no
363media_changed: no no 370media_changed: no no
371unlock_native_capacity: no no
364revalidate_disk: no no 372revalidate_disk: no no
373getgeo: no no
374swap_slot_free_notify: no no (see below)
375
376media_changed, unlock_native_capacity and revalidate_disk are called only from
377check_disk_change().
378
379swap_slot_free_notify is called with swap_lock and sometimes the page lock
380held.
365 381
366The last two are called only from check_disk_change().
367 382
368--------------------------- file_operations ------------------------------- 383--------------------------- file_operations -------------------------------
369prototypes: 384prototypes: