1/* 2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5#ifndef USERLAND_FS_HAIKU_KERNEL_IO_REQUEST_H 6#define USERLAND_FS_HAIKU_KERNEL_IO_REQUEST_H 7 8#include <fs_interface.h> 9 10#include <util/OpenHashTable.h> 11 12#include "../IORequestInfo.h" 13 14 15namespace UserlandFS { 16 17class HaikuKernelVolume; 18 19struct HaikuKernelIORequest : IORequestInfo { 20 21 HaikuKernelVolume* volume; 22 int32 refCount; 23 HaikuKernelIORequest* hashLink; 24 25 HaikuKernelIORequest(HaikuKernelVolume* volume, const IORequestInfo& info) 26 : 27 IORequestInfo(info), 28 volume(volume), 29 refCount(1) 30 { 31 } 32}; 33 34struct HaikuKernelIterativeFDIOCookie { 35 int fd; 36 HaikuKernelIORequest* request; 37 iterative_io_get_vecs getVecs; 38 iterative_io_finished finished; 39 void* cookie; 40 41 HaikuKernelIterativeFDIOCookie(int fd, HaikuKernelIORequest* request, 42 iterative_io_get_vecs getVecs, iterative_io_finished finished, 43 void* cookie) 44 : 45 fd(fd), 46 request(request), 47 getVecs(getVecs), 48 finished(finished), 49 cookie(cookie) 50 { 51 } 52}; 53 54} // namespace UserlandFS 55 56 57using UserlandFS::HaikuKernelIORequest; 58using UserlandFS::HaikuKernelIterativeFDIOCookie; 59 60 61#endif // USERLAND_FS_HAIKU_KERNEL_IO_REQUEST_H 62