haskus-system-0.7.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.System.Linux.Internals.FileSystem

Description

Linux FS internals

Synopsis

Documentation

data IOVec Source #

Entry for vectors of buffers

Constructors

IOVec 

Fields

Instances

Generic IOVec Source # 

Associated Types

type Rep IOVec :: * -> * #

Methods

from :: IOVec -> Rep IOVec x #

to :: Rep IOVec x -> IOVec #

Storable IOVec Source # 

Methods

peekIO :: Ptr IOVec -> IO IOVec #

pokeIO :: Ptr IOVec -> IOVec -> IO () #

alignment :: IOVec -> Word #

sizeOf :: IOVec -> Word #

type Rep IOVec Source # 
type Rep IOVec = D1 (MetaData "IOVec" "Haskus.System.Linux.Internals.FileSystem" "haskus-system-0.7.0.0-FRxqghdHeI3NpHOm98r9a" False) (C1 (MetaCons "IOVec" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "iovecPtr") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 (Ptr ()))) (S1 (MetaSel (Just Symbol "iovecSize") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word64))))

maxIOVec :: Word Source #

Maximum number of IOVec for writev/readv Also called UIO_MAXIOV or IOV_MAX

data SeekWhence Source #

Constructors

SeekSet

seek relative to beginning of file

SeekCurrent

seek relative to current file position

SeekEnd

seek relative to end of file

SeekData

seek to the next data

SeekHole

seek to the next hole

data TrimRange Source #

struct fstrim_range

Constructors

TrimRange 

Instances

Show TrimRange Source # 
Generic TrimRange Source # 

Associated Types

type Rep TrimRange :: * -> * #

Storable TrimRange Source # 
type Rep TrimRange Source # 
type Rep TrimRange = D1 (MetaData "TrimRange" "Haskus.System.Linux.Internals.FileSystem" "haskus-system-0.7.0.0-FRxqghdHeI3NpHOm98r9a" False) (C1 (MetaCons "TrimRange" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "trStart") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word64)) ((:*:) (S1 (MetaSel (Just Symbol "trLength") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word64)) (S1 (MetaSel (Just Symbol "trMinLength") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word64)))))

data FileDedupeRangeInfo Source #

from struct btrfs_ioctl_file_extent_same_info struct file_dedupe_range_info

Constructors

FileDedupeRangeInfo 

Fields

Instances

Eq FileDedupeRangeInfo Source # 
Show FileDedupeRangeInfo Source # 
Generic FileDedupeRangeInfo Source # 
Storable FileDedupeRangeInfo Source # 
type Rep FileDedupeRangeInfo Source # 
type Rep FileDedupeRangeInfo = D1 (MetaData "FileDedupeRangeInfo" "Haskus.System.Linux.Internals.FileSystem" "haskus-system-0.7.0.0-FRxqghdHeI3NpHOm98r9a" False) (C1 (MetaCons "FileDedupeRangeInfo" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "fdriDestFD") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int64)) (S1 (MetaSel (Just Symbol "fdriDestOffset") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word64))) ((:*:) (S1 (MetaSel (Just Symbol "fdriBytesDeduped") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word64)) ((:*:) (S1 (MetaSel (Just Symbol "fdriStatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int32)) (S1 (MetaSel (Just Symbol "fdriReserved") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word32))))))

data FileDedupeRangeHeader Source #

from struct btrfs_ioctl_file_extent_same_args struct file_dedupe_range

Constructors

FileDedupeRangeHeader 

Fields

Instances

Eq FileDedupeRangeHeader Source # 
Show FileDedupeRangeHeader Source # 
Generic FileDedupeRangeHeader Source # 
Storable FileDedupeRangeHeader Source # 
type Rep FileDedupeRangeHeader Source # 
type Rep FileDedupeRangeHeader = D1 (MetaData "FileDedupeRangeHeader" "Haskus.System.Linux.Internals.FileSystem" "haskus-system-0.7.0.0-FRxqghdHeI3NpHOm98r9a" False) (C1 (MetaCons "FileDedupeRangeHeader" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "fdrSrcOffset") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word64)) (S1 (MetaSel (Just Symbol "fdrSrcLengtj") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word64))) ((:*:) (S1 (MetaSel (Just Symbol "fdrDestCount") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word16)) ((:*:) (S1 (MetaSel (Just Symbol "fdrReserved1") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word16)) (S1 (MetaSel (Just Symbol "fdrReserved2") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word32))))))

data InodesStat Source #

struct inodes_stat_t

Constructors

InodesStat 

Instances

data MountFlag Source #

These are the fs-independent mount-flags: up to 32 flags are supported

Constructors

MountReadOnly

Mount read-only

MountNoSuid

Ignore suid and sgid bits

MountNoDevice

Disallow access to device special files

MountNoExec

Disallow program execution

MountSynchronous

Writes are synced at once

MountRemount

Alter flags of a mounted FS

MountMandatoryLock

Allow mandatory locks on an FS

MountSynchronousDirectory

Directory modifications are synchronous

MountReserved1 
MountReserved2 
MountNoAccessTime

Do not update access times

MountNoDirectoryAccessTime

Do not update directory access times

MountBind

Bind directory at different place

MountMove

Move a subtree (without unmounting)

MountRecursive

Recursive (loop-back) mount

MountSilent

Disable some warnings in the kernel log

MountPosixACL

VFS does not apply the umask

MountUnbindable

Change to unbindable

MountPrivate

Change to private

MountSlave

Change to slave

MountShared

Change to shared

MountRelativeAccessTime

Update atime relative to mtime/ctime

MountKernelMount

This is a kern_mount call

MountUpdateInodeVersion

Update inode I_version field

MountStrictAccessTime

Always perform atime updates

MountLazyTime

Update the on-disk [acm]times lazily

remountFlagMask :: MountFlags Source #

Superblock flags that can be altered by MS_REMOUNT

data FsxAttr Source #

Structure for FS_IOC_FSGETXATTR[A] and FS_IOC_FSSETXATTR struct fsxattr

Constructors

FsxAttr 

Fields

data XFlag Source #

Constructors

XFlagRealTime

data in realtime volume

XFlagPrealloc

preallocated file extents

XFlagImmutable

file cannot be modified

XFlagAppend

all writes append

XFlagSync

all writes synchronous

XFlagNoAtime

do not update access time

XFlagNoDump

do not include in backups

XFlagRTInherit

create with rt bit set

XFlagProjecInherit

create with parents projid

XFlagNoSymLinks

disallow symlink creation

XFlagExtSize

extent size allocator hint

XFlagExtSizeInherit

inherit inode extent size

XFlagNoDefrag

do not defragment

XFlagFileStream

use filestream allocator

XFlagDAX

use DAX for IO

XFlagHasAttr

no DIFLAG for this

data Range Source #

Constructors

Range 

Instances

Generic Range Source # 

Associated Types

type Rep Range :: * -> * #

Methods

from :: Range -> Rep Range x #

to :: Rep Range x -> Range #

Storable Range Source # 

Methods

peekIO :: Ptr Range -> IO Range #

pokeIO :: Ptr Range -> Range -> IO () #

alignment :: Range -> Word #

sizeOf :: Range -> Word #

type Rep Range Source # 
type Rep Range = D1 (MetaData "Range" "Haskus.System.Linux.Internals.FileSystem" "haskus-system-0.7.0.0-FRxqghdHeI3NpHOm98r9a" False) (C1 (MetaCons "Range" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "rangeStart") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word64)) (S1 (MetaSel (Just Symbol "rangeLength") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word64))))

ioctlSetReadOnlyStatus :: Bool -> Handle -> IOErr () Source #

BLKROSET set device read-only (0 = read-write)

ioctlGetReadOnlyStatus :: Handle -> IOErr Bool Source #

BLKROGET get read-only status (0 = read_write)

ioctlReReadPartitionTable :: Handle -> IOErr () Source #

BLKRRPART re-read partition table

ioctlFlushBuferCache :: Handle -> IOErr () Source #

BLKGETSIZE return device size /512 (long *arg) Use the 64-bit version instead ioctlGetDeviceSize32 :: Handle -> IOErr CLong ioctlGetDeviceSize32 fd = with 0 $ (p :: Ptr CLong) -> blkIoctl 96 0 fd ||> toErrorCode >.~.> (const $ peek p)

BLKFLSBUF flush buffer cache

ioctlSetReadAhead :: Int64 -> Handle -> IOErr () Source #

BLKRASET set read ahead for block device

ioctlGetReadAhead :: Handle -> IOErr CLong Source #

BLKRAGET get current read ahead setting

ioctlSetMaxSectors :: CUShort -> Handle -> IOErr () Source #

BLKSECTSET set max sectors per request

Doesn't seem to be supported by Linux (cf block/ioctl.c)

ioctlGetMaxSectors :: Handle -> IOErr CUShort Source #

BLKSECTGET get max sectors per request

ioctlGetLogicalBlockSize :: Handle -> IOErr Int Source #

BLKSSZGET get block device logical block size

ioctlGetSoftBlockSize :: Handle -> IOErr Int Source #

BLKBSZGET get block device soft block size

ioctlSetSoftBlockSize :: Int -> Handle -> IOErr () Source #

BLKBSZSET set block device soft block size

ioctlGetSize :: Handle -> IOErr Word64 Source #

BLKGETSIZE64 return device size in bytes

ioctlTraceStart :: Handle -> IOErr () Source #

BLKTRACESTART

ioctlTraceStop :: Handle -> IOErr () Source #

BLKTRACESTOP

ioctlTraceTearDown :: Handle -> IOErr () Source #

BLKTRACETEARDOWN

ioctlDiscard :: Range -> Handle -> IOErr () Source #

BLKDISCARD

ioctlGetPhysicalBlockSize :: Handle -> IOErr CUInt Source #

BLKPBSZGET get block device physical block size

ioctlDiscardSecure :: Range -> Handle -> IOErr () Source #

BLKSECDISCARD

ioctlZeroOut :: Range -> Handle -> IOErr () Source #

BLKZEROOUT

ioctlFreeze :: Int -> Handle -> IOErr Int Source #

Freeze (FIFREEZE)

ioctlThaw :: Int -> Handle -> IOErr Int Source #

Thaw (FITHAW)

ioctlClone :: Int -> Handle -> IOErr () Source #

Clone (FICLONE)

ioctlCloneRange :: FileCloneRange -> Handle -> IOErr () Source #

Clone range (FICLONERANGE)

ioctlGetFlags :: Handle -> IOErr CLong Source #

FIDEDUPERANGE The size parameter must be sizeOf FileDedupeRangeHeader but the actual object is a FileDedupeRangeHeader followed by an array of FileDedupeRangeInfo structures...

ioctlDedupeRange :: Handle -> FileDe -> IOErr () ioctlDedupeRange = ioctlWrite 0x94 54

FS_IOC_GETFLAGS

ioctlSetFlags :: CLong -> Handle -> IOErr () Source #

FS_IOC_SETFLAGS

ioctlGetVersion :: Handle -> IOErr CLong Source #

FS_IOC_GETVERSION

ioctlSetVersion :: CLong -> Handle -> IOErr () Source #

FS_IOC_SETVERSION

ioctlGetFlags32 :: Handle -> IOErr Int Source #

FS_IOC32_GETFLAGS

ioctlSetFlags32 :: Int -> Handle -> IOErr () Source #

FS_IOC32_SETFLAGS

ioctlGetVersion32 :: Handle -> IOErr Int Source #

FS_IOC32_GETVERSION

ioctlSetVersion32 :: Int -> Handle -> IOErr () Source #

FS_IOC32_SETVERSION

ioctlGetXAttr :: Handle -> IOErr FsxAttr Source #

FS_IOC_FSGETXATTR

ioctlSetXAttr :: FsxAttr -> Handle -> IOErr () Source #

FS_IOC_FSSETXATTR

data FSCryptPolicy Source #

File system encryption policy (provided via an ioctl on the topmost directoy)

ioctlSetEncryptionPolicy :: FSCryptPolicy -> Handle -> IOErr () Source #

FS_IOC_SET_ENCRYPTION_POLICY

ioctlGetEncryptionPWSalt :: Handle -> IOErr (Vector 16 Word8) Source #

FS_IOC_GET_ENCRYPTION_PWSALT

ioctlGetEncryptionPolicy :: Handle -> IOErr FSCryptPolicy Source #

FS_IOC_GET_ENCRYPTION_POLICY

data InodeFlag Source #

Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS)

Constructors

InodeFlagSecureDeletion

Secure deletion

InodeFlagUndelete

Undelete

InodeFlagCompress

Compress file

InodeFlagSynchronous

Synchronous updates

InodeFlagImmutable

Immutable file

InodeFlagAppend

writes to file may only append

InodeFlagNoDump

do not dump file

InodeFlagNoAccessTime

do not update atime

InodeFlagDirty 
InodeFlagCompressedClusters

One or more compressed clusters

InodeFlagNoCompression

Don't compress

InodeFlagEncrypt

Encrypted file

InodeFlagBTree_HashIndexed

btree format dir / hash-indexed directory

InodeFlagAFS

AFS directory

InodeFlagJournalData

Reserved for ext3

InodeFlagNoTail

file tail should not be merged

InodeFlagDirSync

dirsync behaviour (directories only)

InodeFlagTopDir

Top of directory hierarchies

InodeFlagHugeFile

Reserved for ext4

InodeFlagExtent

Extents

InodeFlagEA

Inode used for large EA

InodeFlagEOFBlocks

Reserved for ext4

InodeFlagNoCow

Do not cow file

InodeFlagInlineData

Reserved for ext4

InodeFlagProjectInherit

Create with parents projid

InodeFlagReserved

reserved for ext2 lib

data RWF Source #

Flags for preadv2/pwritev2

Constructors

RWFHiPri

High priority request, poll if possible

RWFDSync

per-IO O_DSYNC

RWFSync

per-IO O_SYNC

Instances

Enum RWF Source # 

Methods

succ :: RWF -> RWF #

pred :: RWF -> RWF #

toEnum :: Int -> RWF #

fromEnum :: RWF -> Int #

enumFrom :: RWF -> [RWF] #

enumFromThen :: RWF -> RWF -> [RWF] #

enumFromTo :: RWF -> RWF -> [RWF] #

enumFromThenTo :: RWF -> RWF -> RWF -> [RWF] #

Eq RWF Source # 

Methods

(==) :: RWF -> RWF -> Bool #

(/=) :: RWF -> RWF -> Bool #

Show RWF Source # 

Methods

showsPrec :: Int -> RWF -> ShowS #

show :: RWF -> String #

showList :: [RWF] -> ShowS #

CBitSet RWF Source #