00001
00002
00003
00004
00005
00006
00007 #include "ad_ntfs.h"
00008
00009 void ADIOI_NTFS_IreadContig(ADIO_File fd, void *buf, int count,
00010 MPI_Datatype datatype, int file_ptr_type,
00011 ADIO_Offset offset, ADIO_Request *request, int *error_code)
00012 {
00013 int len, typesize;
00014 int err;
00015 static char myname[] = "ADIOI_NTFS_IreadContig";
00016
00017 MPI_Type_size(datatype, &typesize);
00018 len = count * typesize;
00019
00020 if (file_ptr_type == ADIO_INDIVIDUAL)
00021 {
00022 offset = fd->fp_ind;
00023 }
00024 err = ADIOI_NTFS_aio(fd, buf, len, offset, 0, request);
00025 if (file_ptr_type == ADIO_INDIVIDUAL)
00026 {
00027 fd->fp_ind += len;
00028 }
00029
00030
00031 if (err != MPI_SUCCESS)
00032 {
00033 *error_code = MPIO_Err_create_code(err, MPIR_ERR_RECOVERABLE,
00034 myname, __LINE__, MPI_ERR_IO,
00035 "**io", 0);
00036 return;
00037 }
00038
00039 *error_code = MPI_SUCCESS;
00040
00041 fd->fp_sys_posn = -1;
00042 }