linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] remove i_alloc_sem V2
@ 2011-06-24 18:29 Christoph Hellwig
  2011-06-24 18:29 ` [PATCH 1/9] fat: remove i_alloc_sem abuse Christoph Hellwig
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Christoph Hellwig @ 2011-06-24 18:29 UTC (permalink / raw)
  To: viro, tglx
  Cc: linux-fsdevel, linux-ext4, linux-btrfs, hirofumi, mfasheh, jlbec

i_alloc_sem has always been a bit of an odd "lock".  It's the only remaining
rw_semaphore that can be released by a different thread than the one that
locked it, and it's use case in the core direct I/O code is more like a
counter given that the writers already have external serialization.

This series removes it in favour of a simpler counter scheme, thus getting
rid of the rw_semaphore non-owner APIs as requests by Thomas, while at the
same time shrinking the size of struct inode by 160 bytes on 64-bit systems.

The only nasty bit is that two filesystems (fat and ext4) have started
abusing the lock for their own purposes.  I've added a new rw_semaphore
to the fat node structures to keep the current behaviour, and merged a
patch from Jan Kara to remove the i_alloc_sem abuse from ext4.

changes from v1:
 - update the fat patch description
 - replace my ext4 truncate_lock patch with Jan's rewrite of ext4_page_mkwrite
 - do not use wait_on_bit, but replace it with an opencoded hashed waitqueue
 - rename inode_dio_wake to inode_dio_done
 - add kerneldoc comments for inode_dio_wait and inode_dio_done
 - simplify the blockdev_direct_IO prototype
 - move the i_dio_count decrement into the ->end_io handler if present to
   make i_dio_count useful for filesystems delaying AIO completion
 - reorder the patch series - patches 1 to 5 are the meat, the rest is
   additonal tidyups in that area required for future improvements

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-06-24 18:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-24 18:29 [PATCH 0/9] remove i_alloc_sem V2 Christoph Hellwig
2011-06-24 18:29 ` [PATCH 1/9] fat: remove i_alloc_sem abuse Christoph Hellwig
2011-06-24 18:29 ` [PATCH 2/9] ext4: Rewrite ext4_page_mkwrite() to use generic helpers Christoph Hellwig
2011-06-24 18:29 ` [PATCH 3/9] fs: simplify handling of zero sized reads in __blockdev_direct_IO Christoph Hellwig
2011-06-24 18:29 ` [PATCH 4/9] fs: kill i_alloc_sem Christoph Hellwig
2011-06-24 18:34   ` Christoph Hellwig
2011-06-24 18:29 ` [PATCH 5/9] rw_semaphore: remove up/down_read_non_owner Christoph Hellwig
2011-06-24 18:29 ` [PATCH 6/9] fs: move inode_dio_wait calls into ->setattr Christoph Hellwig
2011-06-24 18:29 ` [PATCH 7/9] fs: always maintain i_dio_count Christoph Hellwig
2011-06-24 18:29 ` [PATCH 8/9] fs: simplify the blockdev_direct_IO prototype Christoph Hellwig
2011-06-24 18:29 ` [PATCH 9/9] fs: move inode_dio_done to the end_io handler Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).