History

Merge branch 'block-dev'

Merge 'block-dev' branch. I was going to just mark everything here for stable and leave it to the 3.8 merge window, but having decided on doing another -rc, I migth as well merge it now. This removes the bd_block_size_semaphore semaphore that was added in this release to fix a race condition between block size changes and block IO, and replaces it with atomicity guaratees in fs/buffer.c instead, along with simplifying fs/block-dev.c. This removes more lines than it adds, makes the code generally simpler, and avoids the latency/rt issues that the block size semaphore introduced for mount. I'm not happy with the timing, but it wouldn't be much better doing this during the merge window and then having some delayed back-port of it into stable. * block-dev: blkdev_max_block: make private to fs/buffer.c direct-io: don't read inode->i_blkbits multiple times blockdev: remove bd_block_size_semaphore again fs/buffer.c: make block-size be per-page and protected by the page lock

Linus Torvalds committed 13 years ago

Commit d3594ea2 parents 7e5530a bbec0275 files · +72 −196Browse files

Showing the changes to include/linux (1 of 5 files). Show all

Unified · Split

include/linux/fs.h+0−5
@@ -462,8 +462,6 @@ struct block_device { · 461 unmodified lines
462 int bd_fsfreeze_count;462 int bd_fsfreeze_count;
463 /* Mutex for freeze */463 /* Mutex for freeze */
464 struct mutex bd_fsfreeze_mutex;464 struct mutex bd_fsfreeze_mutex;
465 /* A semaphore that prevents I/O while block size is being changed */
466 struct percpu_rw_semaphore bd_block_size_semaphore;
467};465};
468 466
469/*467/*
@@ -2049,7 +2047,6 @@ extern void unregister_blkdev(unsigned int, const char *); · 1579 unmodified lines
2049extern struct block_device *bdget(dev_t);2047extern struct block_device *bdget(dev_t);
2050extern struct block_device *bdgrab(struct block_device *bdev);2048extern struct block_device *bdgrab(struct block_device *bdev);
2051extern void bd_set_size(struct block_device *, loff_t size);2049extern void bd_set_size(struct block_device *, loff_t size);
2052extern sector_t blkdev_max_block(struct block_device *bdev);
2053extern void bd_forget(struct inode *inode);2050extern void bd_forget(struct inode *inode);
2054extern void bdput(struct block_device *);2051extern void bdput(struct block_device *);
2055extern void invalidate_bdev(struct block_device *);2052extern void invalidate_bdev(struct block_device *);
@@ -2379,8 +2376,6 @@ extern int generic_segment_checks(const struct iovec *iov, · 323 unmodified lines
2379 unsigned long *nr_segs, size_t *count, int access_flags);2376 unsigned long *nr_segs, size_t *count, int access_flags);
2380 2377
2381/* fs/block_dev.c */2378/* fs/block_dev.c */
2382extern ssize_t blkdev_aio_read(struct kiocb *iocb, const struct iovec *iov,
2383 unsigned long nr_segs, loff_t pos);
2384extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,2379extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
2385 unsigned long nr_segs, loff_t pos);2380 unsigned long nr_segs, loff_t pos);
2386extern int blkdev_fsync(struct file *filp, loff_t start, loff_t end,2381extern int blkdev_fsync(struct file *filp, loff_t start, loff_t end,