#include <blockdev.h>
Inherits BazisLib::Linux::Device.
Inherited by BazisLib::Linux::UniversalVolume.
Classes | |
class | Initializer |
Initializes BasicBlockDevice::m_FileOperations. More... | |
class | WorkerThread |
Public Member Functions | |
virtual LKSTATUS __bzslib_extern | RegisterDevice (class Driver *pDriver) override |
const char * | GetDeviceName () |
Protected Types | |
enum | { KERNEL_SECTOR_SIZE = 512 } |
Protected Member Functions | |
__bzslib_extern | BasicBlockDevice (const char *pszDeviceName, int MinorCount=1) |
__bzslib_extern | ~BasicBlockDevice () |
LKSTATUS __bzslib_extern | RegisterBlockDeviceObject (int MajorNumber=0, module *pOwner=THIS_MODULE) |
virtual block_device_operations * | GetDeviceOperations () |
virtual LKSTATUS __bzslib_extern | OnIoctl (struct inode *pInode, struct file *pFile, unsigned int num, unsigned long param) |
virtual LKSTATUS __bzslib_extern | OnOpen (struct inode *pInode, struct file *pFile) |
virtual LKSTATUS __bzslib_extern | OnClose (struct inode *pInode, struct file *pFile) |
virtual bool __bzslib_extern | OnRead (uint64_t ByteOffset, void *pBuffer, size_t BufferSize) |
virtual bool __bzslib_extern | OnWrite (uint64_t ByteOffset, const void *pBuffer, size_t BufferSize) |
virtual bool | DetectMediaChange () |
virtual void | RevalidateDisk () |
virtual unsigned | GetSectorSize () |
virtual uint64_t | GetTotalDiskSize () |
Static Protected Member Functions | |
static void __bzslib_extern | InitializeDeviceOperations (block_device_operations *pOperations, module *pOwner=THIS_MODULE) |
static __bzslib_extern int | s_open (struct inode *pInode, struct file *pFile) |
static __bzslib_extern int | s_release (struct inode *pInode, struct file *pFile) |
static __bzslib_extern int | s_ioctl (struct inode *pInode, struct file *pFile, unsigned CtlCode, unsigned long Parameter) |
static __bzslib_extern int | s_media_changed (struct gendisk *pDisk) |
static __bzslib_extern int | s_revalidate_disk (struct gendisk *pDisk) |
static __bzslib_extern void | s_request_handler (request_queue_t *pQueue) |
Private Types | |
typedef Device | __super |
Private Attributes | |
WorkerThread | m_WorkerThread |
Semaphore | m_WorkerSemaphore |
bool | m_bDeviceRegistered |
int | m_MajorNumber |
int | m_MinorCount |
SpinLock | m_SpinLock |
gendisk * | m_pDiskObject |
Static Private Attributes | |
static block_device_operations __bzslib_extern | m_DeviceOperations |
static Initializer __bzslib_extern | m_Initializer |
typedef Device BazisLib::Linux::BasicBlockDevice::__super [private] |
__bzslib_extern BazisLib::Linux::BasicBlockDevice::BasicBlockDevice | ( | const char * | pszDeviceName, | |
int | MinorCount = 1 | |||
) | [protected] |
__bzslib_extern BazisLib::Linux::BasicBlockDevice::~BasicBlockDevice | ( | ) | [protected] |
virtual bool BazisLib::Linux::BasicBlockDevice::DetectMediaChange | ( | ) | [inline, protected, virtual] |
const char* BazisLib::Linux::BasicBlockDevice::GetDeviceName | ( | ) | [inline] |
virtual block_device_operations* BazisLib::Linux::BasicBlockDevice::GetDeviceOperations | ( | ) | [inline, protected, virtual] |
virtual unsigned BazisLib::Linux::BasicBlockDevice::GetSectorSize | ( | ) | [inline, protected, virtual] |
Reimplemented in BazisLib::Linux::UniversalVolume.
virtual uint64_t BazisLib::Linux::BasicBlockDevice::GetTotalDiskSize | ( | ) | [inline, protected, virtual] |
Reimplemented in BazisLib::Linux::UniversalVolume.
static void __bzslib_extern BazisLib::Linux::BasicBlockDevice::InitializeDeviceOperations | ( | block_device_operations * | pOperations, | |
module * | pOwner = THIS_MODULE | |||
) | [static, protected] |
virtual LKSTATUS __bzslib_extern BazisLib::Linux::BasicBlockDevice::OnClose | ( | struct inode * | pInode, | |
struct file * | pFile | |||
) | [inline, protected, virtual] |
virtual LKSTATUS __bzslib_extern BazisLib::Linux::BasicBlockDevice::OnIoctl | ( | struct inode * | pInode, | |
struct file * | pFile, | |||
unsigned int | num, | |||
unsigned long | param | |||
) | [inline, protected, virtual] |
virtual LKSTATUS __bzslib_extern BazisLib::Linux::BasicBlockDevice::OnOpen | ( | struct inode * | pInode, | |
struct file * | pFile | |||
) | [inline, protected, virtual] |
virtual bool __bzslib_extern BazisLib::Linux::BasicBlockDevice::OnRead | ( | uint64_t | ByteOffset, | |
void * | pBuffer, | |||
size_t | BufferSize | |||
) | [inline, protected, virtual] |
Reimplemented in BazisLib::Linux::UniversalVolume.
virtual bool __bzslib_extern BazisLib::Linux::BasicBlockDevice::OnWrite | ( | uint64_t | ByteOffset, | |
const void * | pBuffer, | |||
size_t | BufferSize | |||
) | [inline, protected, virtual] |
Reimplemented in BazisLib::Linux::UniversalVolume.
LKSTATUS __bzslib_extern BazisLib::Linux::BasicBlockDevice::RegisterBlockDeviceObject | ( | int | MajorNumber = 0 , |
|
module * | pOwner = THIS_MODULE | |||
) | [protected] |
virtual LKSTATUS __bzslib_extern BazisLib::Linux::BasicBlockDevice::RegisterDevice | ( | class Driver * | pDriver | ) | [override, virtual] |
This method registers the block device within the system. Currently, it calls Device::RegisterDevice() and registers the block device within Linux kernel.
Reimplemented from BazisLib::Linux::Device.
Reimplemented in BazisLib::Linux::UniversalVolume.
virtual void BazisLib::Linux::BasicBlockDevice::RevalidateDisk | ( | ) | [inline, protected, virtual] |
static __bzslib_extern int BazisLib::Linux::BasicBlockDevice::s_ioctl | ( | struct inode * | pInode, | |
struct file * | pFile, | |||
unsigned | CtlCode, | |||
unsigned long | Parameter | |||
) | [static, protected] |
static __bzslib_extern int BazisLib::Linux::BasicBlockDevice::s_media_changed | ( | struct gendisk * | pDisk | ) | [static, protected] |
static __bzslib_extern int BazisLib::Linux::BasicBlockDevice::s_open | ( | struct inode * | pInode, | |
struct file * | pFile | |||
) | [static, protected] |
static __bzslib_extern int BazisLib::Linux::BasicBlockDevice::s_release | ( | struct inode * | pInode, | |
struct file * | pFile | |||
) | [static, protected] |
static __bzslib_extern void BazisLib::Linux::BasicBlockDevice::s_request_handler | ( | request_queue_t * | pQueue | ) | [static, protected] |
static __bzslib_extern int BazisLib::Linux::BasicBlockDevice::s_revalidate_disk | ( | struct gendisk * | pDisk | ) | [static, protected] |
bool BazisLib::Linux::BasicBlockDevice::m_bDeviceRegistered [private] |
block_device_operations __bzslib_extern BazisLib::Linux::BasicBlockDevice::m_DeviceOperations [static, private] |
Initializer __bzslib_extern BazisLib::Linux::BasicBlockDevice::m_Initializer [static, private] |
int BazisLib::Linux::BasicBlockDevice::m_MajorNumber [private] |
int BazisLib::Linux::BasicBlockDevice::m_MinorCount [private] |
gendisk* BazisLib::Linux::BasicBlockDevice::m_pDiskObject [private] |