aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2012-09-28 23:24:52 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-09-28 23:24:52 -0400
commite27f41e1b789e60e7d8cc9c81fd93ca49ef31f13 (patch)
treee0c3aba6313900ecca447dbe1681833d2f04909c /fs/ext4
parentf45ee3a1ea438af96e4fd2c0b16d195e67ef235f (diff)
ext4: give i_aiodio_unwritten a more appropriate name
AIO/DIO prefix is wrong because it account unwritten extents which also may be scheduled from buffered write endio Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/ext4.h4
-rw-r--r--fs/ext4/file.c6
-rw-r--r--fs/ext4/page-io.c2
-rw-r--r--fs/ext4/super.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 3e8e185e5e22..6ec9856065d6 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -912,7 +912,7 @@ struct ext4_inode_info {
912 struct list_head i_completed_io_list; 912 struct list_head i_completed_io_list;
913 spinlock_t i_completed_io_lock; 913 spinlock_t i_completed_io_lock;
914 atomic_t i_ioend_count; /* Number of outstanding io_end structs */ 914 atomic_t i_ioend_count; /* Number of outstanding io_end structs */
915 atomic_t i_aiodio_unwritten; /* Nr. of inflight conversions pending */ 915 atomic_t i_unwritten; /* Nr. of inflight conversions pending */
916 916
917 spinlock_t i_block_reservation_lock; 917 spinlock_t i_block_reservation_lock;
918 918
@@ -1332,7 +1332,7 @@ static inline void ext4_set_io_unwritten_flag(struct inode *inode,
1332{ 1332{
1333 if (!(io_end->flag & EXT4_IO_END_UNWRITTEN)) { 1333 if (!(io_end->flag & EXT4_IO_END_UNWRITTEN)) {
1334 io_end->flag |= EXT4_IO_END_UNWRITTEN; 1334 io_end->flag |= EXT4_IO_END_UNWRITTEN;
1335 atomic_inc(&EXT4_I(inode)->i_aiodio_unwritten); 1335 atomic_inc(&EXT4_I(inode)->i_unwritten);
1336 } 1336 }
1337} 1337}
1338 1338
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 3b0e3bdaabfc..39335bda404b 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -55,11 +55,11 @@ static int ext4_release_file(struct inode *inode, struct file *filp)
55 return 0; 55 return 0;
56} 56}
57 57
58static void ext4_aiodio_wait(struct inode *inode) 58static void ext4_unwritten_wait(struct inode *inode)
59{ 59{
60 wait_queue_head_t *wq = ext4_ioend_wq(inode); 60 wait_queue_head_t *wq = ext4_ioend_wq(inode);
61 61
62 wait_event(*wq, (atomic_read(&EXT4_I(inode)->i_aiodio_unwritten) == 0)); 62 wait_event(*wq, (atomic_read(&EXT4_I(inode)->i_unwritten) == 0));
63} 63}
64 64
65/* 65/*
@@ -116,7 +116,7 @@ ext4_file_dio_write(struct kiocb *iocb, const struct iovec *iov,
116 "performance will be poor.", 116 "performance will be poor.",
117 inode->i_ino, current->comm); 117 inode->i_ino, current->comm);
118 mutex_lock(ext4_aio_mutex(inode)); 118 mutex_lock(ext4_aio_mutex(inode));
119 ext4_aiodio_wait(inode); 119 ext4_unwritten_wait(inode);
120 } 120 }
121 121
122 BUG_ON(iocb->ki_pos != pos); 122 BUG_ON(iocb->ki_pos != pos);
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index dcdeef169a69..de77e31cc119 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -113,7 +113,7 @@ int ext4_end_io_nolock(ext4_io_end_t *io)
113 if (io->flag & EXT4_IO_END_DIRECT) 113 if (io->flag & EXT4_IO_END_DIRECT)
114 inode_dio_done(inode); 114 inode_dio_done(inode);
115 /* Wake up anyone waiting on unwritten extent conversion */ 115 /* Wake up anyone waiting on unwritten extent conversion */
116 if (atomic_dec_and_test(&EXT4_I(inode)->i_aiodio_unwritten)) 116 if (atomic_dec_and_test(&EXT4_I(inode)->i_unwritten))
117 wake_up_all(ext4_ioend_wq(io->inode)); 117 wake_up_all(ext4_ioend_wq(io->inode));
118 return ret; 118 return ret;
119} 119}
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index e05267ab1f81..982f6fc22c88 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -968,7 +968,7 @@ static struct inode *ext4_alloc_inode(struct super_block *sb)
968 ei->i_sync_tid = 0; 968 ei->i_sync_tid = 0;
969 ei->i_datasync_tid = 0; 969 ei->i_datasync_tid = 0;
970 atomic_set(&ei->i_ioend_count, 0); 970 atomic_set(&ei->i_ioend_count, 0);
971 atomic_set(&ei->i_aiodio_unwritten, 0); 971 atomic_set(&ei->i_unwritten, 0);
972 972
973 return &ei->vfs_inode; 973 return &ei->vfs_inode;
974} 974}