diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2008-10-16 01:05:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 14:21:51 -0400 |
commit | ebf3f09c634906d371f2bfd71b41c7e0c52efe7e (patch) | |
tree | 4205040f47fba2675dc4c6b1407d15c9d6f8b355 /include/linux/aio.h | |
parent | d8273674721faaf84bec2190c0c7a82972b37f73 (diff) |
Configure out AIO support
This patchs adds the CONFIG_AIO option which allows to remove support
for asynchronous I/O operations, that are not necessarly used by
applications, particularly on embedded devices. As this is a
size-reduction option, it depends on CONFIG_EMBEDDED. It allows to
save ~7 kilobytes of kernel code/data:
text data bss dec hex filename
1115067 119180 217088 1451335 162547 vmlinux
1108025 119048 217088 1444161 160941 vmlinux.new
-7042 -132 0 -7174 -1C06 +/-
This patch has been originally written by Matt Mackall
<mpm@selenic.com>, and is part of the Linux Tiny project.
[randy.dunlap@oracle.com: build fix]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/aio.h')
-rw-r--r-- | include/linux/aio.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h index 09b276c35227..f6b8cf99b596 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -204,12 +204,21 @@ struct kioctx { | |||
204 | /* prototypes */ | 204 | /* prototypes */ |
205 | extern unsigned aio_max_size; | 205 | extern unsigned aio_max_size; |
206 | 206 | ||
207 | #ifdef CONFIG_AIO | ||
207 | extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); | 208 | extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); |
208 | extern int aio_put_req(struct kiocb *iocb); | 209 | extern int aio_put_req(struct kiocb *iocb); |
209 | extern void kick_iocb(struct kiocb *iocb); | 210 | extern void kick_iocb(struct kiocb *iocb); |
210 | extern int aio_complete(struct kiocb *iocb, long res, long res2); | 211 | extern int aio_complete(struct kiocb *iocb, long res, long res2); |
211 | struct mm_struct; | 212 | struct mm_struct; |
212 | extern void exit_aio(struct mm_struct *mm); | 213 | extern void exit_aio(struct mm_struct *mm); |
214 | #else | ||
215 | static inline ssize_t wait_on_sync_kiocb(struct kiocb *iocb) { return 0; } | ||
216 | static inline int aio_put_req(struct kiocb *iocb) { return 0; } | ||
217 | static inline void kick_iocb(struct kiocb *iocb) { } | ||
218 | static inline int aio_complete(struct kiocb *iocb, long res, long res2) { return 0; } | ||
219 | struct mm_struct; | ||
220 | static inline void exit_aio(struct mm_struct *mm) { } | ||
221 | #endif /* CONFIG_AIO */ | ||
213 | 222 | ||
214 | #define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait) | 223 | #define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait) |
215 | 224 | ||