diff options
author | Nathan Scott <nathans@sgi.com> | 2005-05-05 16:30:34 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@melbourne.sgi.com> | 2005-05-05 16:30:34 -0400 |
commit | 3f243766660da3df4a75ea1892c310d6080646c8 (patch) | |
tree | ac2b037cfea6d9bf36ec74b0719497f986c17631 /fs | |
parent | abd0cf7aeaaf8a15d9777e65606b6076868b6186 (diff) |
[XFS] Disable the combination of XFS direct IO and AIO until the IO completion
handling for unwritten extents can be moved out of interrupt context.
SGI Modid: xfs-linux:xfs-kern:22343a
Signed-off-by: Nathan Scott <nathans@sgi.com>
Signed-off-by: Christoph Hellwig <hch@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_file.c | 43 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_lrw.c | 3 |
2 files changed, 44 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 9f057a4a5b06..d0d412afd261 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c | |||
@@ -515,10 +515,49 @@ open_exec_out: | |||
515 | } | 515 | } |
516 | #endif /* HAVE_FOP_OPEN_EXEC */ | 516 | #endif /* HAVE_FOP_OPEN_EXEC */ |
517 | 517 | ||
518 | /* | ||
519 | * Temporary workaround to the AIO direct IO write problem. | ||
520 | * This code can go and we can revert to do_sync_write once | ||
521 | * the writepage(s) rework is merged. | ||
522 | */ | ||
523 | STATIC ssize_t | ||
524 | linvfs_write( | ||
525 | struct file *filp, | ||
526 | const char __user *buf, | ||
527 | size_t len, | ||
528 | loff_t *ppos) | ||
529 | { | ||
530 | struct kiocb kiocb; | ||
531 | ssize_t ret; | ||
532 | |||
533 | init_sync_kiocb(&kiocb, filp); | ||
534 | kiocb.ki_pos = *ppos; | ||
535 | ret = __linvfs_write(&kiocb, buf, 0, len, kiocb.ki_pos); | ||
536 | *ppos = kiocb.ki_pos; | ||
537 | return ret; | ||
538 | } | ||
539 | STATIC ssize_t | ||
540 | linvfs_write_invis( | ||
541 | struct file *filp, | ||
542 | const char __user *buf, | ||
543 | size_t len, | ||
544 | loff_t *ppos) | ||
545 | { | ||
546 | struct kiocb kiocb; | ||
547 | ssize_t ret; | ||
548 | |||
549 | init_sync_kiocb(&kiocb, filp); | ||
550 | kiocb.ki_pos = *ppos; | ||
551 | ret = __linvfs_write(&kiocb, buf, IO_INVIS, len, kiocb.ki_pos); | ||
552 | *ppos = kiocb.ki_pos; | ||
553 | return ret; | ||
554 | } | ||
555 | |||
556 | |||
518 | struct file_operations linvfs_file_operations = { | 557 | struct file_operations linvfs_file_operations = { |
519 | .llseek = generic_file_llseek, | 558 | .llseek = generic_file_llseek, |
520 | .read = do_sync_read, | 559 | .read = do_sync_read, |
521 | .write = do_sync_write, | 560 | .write = linvfs_write, |
522 | .readv = linvfs_readv, | 561 | .readv = linvfs_readv, |
523 | .writev = linvfs_writev, | 562 | .writev = linvfs_writev, |
524 | .aio_read = linvfs_aio_read, | 563 | .aio_read = linvfs_aio_read, |
@@ -540,7 +579,7 @@ struct file_operations linvfs_file_operations = { | |||
540 | struct file_operations linvfs_invis_file_operations = { | 579 | struct file_operations linvfs_invis_file_operations = { |
541 | .llseek = generic_file_llseek, | 580 | .llseek = generic_file_llseek, |
542 | .read = do_sync_read, | 581 | .read = do_sync_read, |
543 | .write = do_sync_write, | 582 | .write = linvfs_write_invis, |
544 | .readv = linvfs_readv_invis, | 583 | .readv = linvfs_readv_invis, |
545 | .writev = linvfs_writev_invis, | 584 | .writev = linvfs_writev_invis, |
546 | .aio_read = linvfs_aio_read_invis, | 585 | .aio_read = linvfs_aio_read_invis, |
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index ff145fd0d1a4..aa9daaea6c34 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c | |||
@@ -683,6 +683,9 @@ xfs_write( | |||
683 | (xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? | 683 | (xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? |
684 | mp->m_rtdev_targp : mp->m_ddev_targp; | 684 | mp->m_rtdev_targp : mp->m_ddev_targp; |
685 | 685 | ||
686 | if (ioflags & IO_ISAIO) | ||
687 | return XFS_ERROR(-ENOSYS); | ||
688 | |||
686 | if ((pos & target->pbr_smask) || (count & target->pbr_smask)) | 689 | if ((pos & target->pbr_smask) || (count & target->pbr_smask)) |
687 | return XFS_ERROR(-EINVAL); | 690 | return XFS_ERROR(-EINVAL); |
688 | 691 | ||