Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cirocosta/xfsvol
/ functions
Functions
82 in github.com/cirocosta/xfsvol
⨍
Functions
82
◇
Types & classes
13
↓ 11 callers
Function
setupTestFs
setupTestFs takes a filesystem description as a variable and setups the desired structure under a temp directory.
xfs/xfs_test.go:36
↓ 10 callers
Method
Create
Create validates a volume specification and then proceed with creating the volume under the controlled root directory.
manager/manager.go:166
↓ 8 callers
Method
SetQuota
SetQuota assigns a unique project id to a directory and then set the quota for that projectId.
xfs/control.go:147
↓ 6 callers
Method
Create
(req *v.CreateRequest)
plugin/driver.go:56
↓ 3 callers
Method
Delete
Delete tries to delete a volume by its name. ps.: Deleting a volume that doesn't exist is considered an error.
manager/manager.go:204
↓ 3 callers
Method
Get
Get tries to retrieve a volume by its name (not path). For instance, if the root path that the manager controls is `/mnt/xfs/volumes`, then a volume
manager/manager.go:124
↓ 3 callers
Function
isValidName
isValidName verifies whether a given name is considered valid or not based on a constant naming regular expression.
manager/manager.go:236
↓ 2 callers
Method
Get
(req *v.GetRequest)
plugin/driver.go:137
↓ 2 callers
Method
GetQuota
GetQuota retrieves the quota settings associated with a targetPath that previously had a quota set for it. TODO differentiate between real errors and
xfs/control.go:126
↓ 2 callers
Method
List
List lists all the volumes that have been created under a given root path that is controlled by this manager.
manager/manager.go:85
↓ 2 callers
Function
MakeRelativePathsInFlagsAbsolute
( flags, working_directory )
xfs/.ycm_extra_conf.py:32
↓ 1 callers
Function
DirectoryOfThisScript
()
xfs/.ycm_extra_conf.py:28
↓ 1 callers
Function
GeneratePathToProjectIdMap
GeneratePathToProjectIdMap creates a map that maps the projectIds associated with paths directly under a giving root path.
xfs/control.go:189
↓ 1 callers
Method
GetBackingFsBlockDev
GetBackingFsBlockDev retrieves the absolute path of the backing block device configured for the current quota control instance.
xfs/control.go:116
↓ 1 callers
Function
GetCompilationInfoForFile
( filename )
xfs/.ycm_extra_conf.py:66
↓ 1 callers
Function
GetProjectId
GetProjectId retrieves the extended attribute projectid associated with a given directory.
xfs/xfs.go:134
↓ 1 callers
Function
GetProjectQuota
GetProjectQuota retrieves the quota settings associated with a project-id controlled by a given block device. The values prefixed with `Used` indicat
xfs/xfs.go:101
↓ 1 callers
Function
IsHeaderFile
( filename )
xfs/.ycm_extra_conf.py:61
↓ 1 callers
Method
List
()
plugin/driver.go:104
↓ 1 callers
Function
MakeBackingFsDev
MakeBackingFsDev creates a block device under the directory specified in the `root` argument.
xfs/xfs.go:179
↓ 1 callers
Function
NewDriver
(cfg DriverConfig)
plugin/driver.go:27
↓ 1 callers
Function
SetProjectId
SetProjectId sets the value of the extended attribute projectid associated with a given directory, as well as setting necessary flags (PROJINHERIT).
xfs/xfs.go:157
↓ 1 callers
Function
SetProjectQuota
SetProjectQuota sets quota settings associated with a given projectId controlled by a given block device. The values that are not prefixed with `Used
xfs/xfs.go:40
↓ 1 callers
Function
makeBigString
makeBigString creates a string filled with a single character that is `size` big.
xfs/xfs_test.go:72
Method
Capabilities
TODO is it global?
plugin/driver.go:290
Function
CreateFiles
CreateFiles creates a bunch of files under a given base directory specified.
test_utils/utils.go:13
Function
FlagsForFile
( filename, **kwargs )
xfs/.ycm_extra_conf.py:84
Function
FromHumanSize
(size string)
manager/pretty_bytes.go:21
Function
HumanSize
(size uint64)
manager/pretty_bytes.go:34
Function
IsQuotaEnabled
IsQuotaEnabled checks whether a given filesystem mount indicated by a block device has project quota accounting and enforcement ON.
xfs/xfs.go:72
Method
Mount
(req *v.MountRequest)
plugin/driver.go:236
Function
MustFromHumanSize
(size string)
manager/pretty_bytes.go:9
Function
New
New instantiates a new manager that is meant to take care of volume creation, listing, updating and stats retrieval under a given root path.
manager/manager.go:54
Function
NewControl
NewControl initializes project quota support under a given preconfigured BasePath. It does so by creating a block device right at BasePath and then h
xfs/control.go:69
Method
Path
(req *v.PathRequest)
plugin/driver.go:201
Method
Remove
(req *v.RemoveRequest)
plugin/driver.go:175
Function
TestControl_createsBackingFsBlockDev
(t *testing.T)
xfs/control_test.go:28
Function
TestControl_failsToAssignQuotaToInexistentDirectoryWithinTree
(t *testing.T)
xfs/control_test.go:65
Function
TestControl_flatlyEnforcesDiskQuota
(t *testing.T)
xfs/control_test.go:103
Function
TestControl_flatlyEnforcesINodeQuota
(t *testing.T)
xfs/control_test.go:139
Function
TestControl_quotaAssignmentFailsToIfDirectoryOutsideTree
(t *testing.T)
xfs/control_test.go:45
Function
TestControl_succeedsIfXFSBasedDirectory
(t *testing.T)
xfs/control_test.go:17
Function
TestControl_succeedsToAssignQuotaToDirectoryWithinTree
(t *testing.T)
xfs/control_test.go:83
Function
TestCreate_actuallyHasQuotaEnforced
(t *testing.T)
manager/manager_test.go:109
Function
TestCreate_cantCreateWithEmptySize
(t *testing.T)
manager/manager_test.go:149
Function
TestCreate_failsIfEmptyPath
(t *testing.T)
manager/manager_test.go:50
Function
TestCreate_failsWithWeirdCharacters
(t *testing.T)
manager/manager_test.go:64
Function
TestCreate_succeedsWithNormalPathAndSize
(t *testing.T)
manager/manager_test.go:87
Function
TestDelete_failsForInexistentVolume
(t *testing.T)
manager/manager_test.go:263
Function
TestDelete_succeedsForExistentVolume
(t *testing.T)
manager/manager_test.go:234
Function
TestGetProjectId
(t *testing.T)
xfs/xfs_test.go:82
Function
TestGetProjectStats
(t *testing.T)
xfs/xfs_test.go:362
Function
TestGet_doesntErrorIfNotFound
(t *testing.T)
manager/manager_test.go:197
Function
TestGet_findsDirectory
(t *testing.T)
manager/manager_test.go:212
Function
TestIsQuotaEnabled
(t *testing.T)
xfs/xfs_test.go:435
Function
TestIsQuotaEnabled_failsIfBlockDeviceDoesntExist
(t *testing.T)
xfs/xfs_test.go:405
Function
TestIsQuotaEnabled_notEnabledIfNoProjectQuotaSet
(t *testing.T)
xfs/xfs_test.go:422
Function
TestIsQuotaEnabled_notEnabledIfNotXfs
(t *testing.T)
xfs/xfs_test.go:410
Function
TestList_canList0Directorise
(t *testing.T)
manager/manager_test.go:134
Function
TestList_listsDirectories
(t *testing.T)
manager/manager_test.go:166
Function
TestMakeBackingFsDev
(t *testing.T)
xfs/xfs_test.go:234
Function
TestMakeBackingFsDev_succeedsIfAlreadyExists
(t *testing.T)
xfs/xfs_test.go:297
Function
TestNew_failsWithInexistentRoot
(t *testing.T)
manager/manager_test.go:25
Function
TestNew_failsWithNonAbsolutePath
(t *testing.T)
manager/manager_test.go:32
Function
TestNew_failsWithoutRootSpecified
(t *testing.T)
manager/manager_test.go:20
Function
TestNew_succeedsWithWriteableAbsolutePath
(t *testing.T)
manager/manager_test.go:39
Function
TestSetProjectId
(t *testing.T)
xfs/xfs_test.go:136
Function
TestSetProjectId_childrenHaveProjectIdSet
(t *testing.T)
xfs/xfs_test.go:204
Function
TestSetProjectQuota_failsIfBlockDeviceDoesntExist
(t *testing.T)
xfs/xfs_test.go:312
Function
TestSetProjectQuota_succeeds
(t *testing.T)
xfs/xfs_test.go:332
Method
Unmount
(req *v.UnmountRequest)
plugin/driver.go:272
Function
WriteBytes
WriteBytes writes a given number of bytes in the form of 'character' to a given writer.
test_utils/utils.go:36
Function
createAction
(c *cli.Context)
xfsvolctl/commands/create.go:66
Function
lsAction
(c *cli.Context)
xfsvolctl/commands/ls.go:53
Function
main
()
plugin/main.go:32
Function
main
()
xfsvolctl/main.go:15
Function
xfs_create_fs_block_dev
xfs/xfs.c:145
Function
xfs_get_project_id
xfs/xfs.c:84
Function
xfs_get_project_quota
xfs/xfs.c:60
Function
xfs_is_quota_enabled
xfs/xfs.c:3
Function
xfs_set_project_id
xfs/xfs.c:109
Function
xfs_set_project_quota
xfs/xfs.c:31