* Added disk system flags for whether a partition name and partition
content name are supported. * Added file_system_module_info::flags (analogously to partition_module_info::flags) which indicate which disk device features the FS supports. * Replaced the file_system_module_info/partition_module_info::supports_*() hooks by a get_supported_operations() hook and for partitioning systems additionally a get_supported_child_operations() hook. * Updated file and partitioning systems accordingly. * Updated fs_shell accordingly. * Updated the DDM accordingly. The syscall interface remains unchanged, though. * _user_supports_initializing_partition() also checks whether the parent partitioning system is content now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22043 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -229,6 +229,8 @@
|
||||
#define B_DISK_SYSTEM_SUPPORTS_MOVING FSSH_B_DISK_SYSTEM_SUPPORTS_MOVING
|
||||
#define B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME
|
||||
#define B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS
|
||||
#define B_DISK_SYSTEM_SUPPORTS_INITIALIZING FSSH_B_DISK_SYSTEM_SUPPORTS_INITIALIZING
|
||||
#define B_DISK_SYSTEM_SUPPORTS_CONTENT_NAME FSSH_B_DISK_SYSTEM_SUPPORTS_CONTENT_NAME
|
||||
|
||||
// file system specific flags
|
||||
#define B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING FSSH_B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING
|
||||
@@ -248,7 +250,7 @@
|
||||
#define B_DISK_SYSTEM_SUPPORTS_SETTING_PARAMETERS FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_PARAMETERS
|
||||
#define B_DISK_SYSTEM_SUPPORTS_CREATING_CHILD FSSH_B_DISK_SYSTEM_SUPPORTS_CREATING_CHILD
|
||||
#define B_DISK_SYSTEM_SUPPORTS_DELETING_CHILD FSSH_B_DISK_SYSTEM_SUPPORTS_DELETING_CHILD
|
||||
#define B_DISK_SYSTEM_SUPPORTS_INITIALIZING FSSH_B_DISK_SYSTEM_SUPPORTS_INITIALIZING
|
||||
#define B_DISK_SYSTEM_SUPPORTS_NAME FSSH_B_DISK_SYSTEM_SUPPORTS_NAME
|
||||
|
||||
// disk device job types
|
||||
#define B_DISK_DEVICE_JOB_BAD_TYPE FSSH_B_DISK_DEVICE_JOB_BAD_TYPE
|
||||
|
||||
@@ -67,35 +67,37 @@ enum {
|
||||
|
||||
// disk system flags
|
||||
enum {
|
||||
FSSH_B_DISK_SYSTEM_IS_FILE_SYSTEM = 0x0001,
|
||||
FSSH_B_DISK_SYSTEM_IS_FILE_SYSTEM = 0x000001,
|
||||
|
||||
// flags common for both file and partitioning systems
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_CHECKING = 0x0002,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_REPAIRING = 0x0004,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_RESIZING = 0x0008,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_MOVING = 0x0010,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME = 0x0020,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS = 0x0040,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_CHECKING = 0x000002,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_REPAIRING = 0x000004,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_RESIZING = 0x000008,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_MOVING = 0x000010,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME = 0x000020,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS = 0x000040,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_INITIALIZING = 0x000080,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_CONTENT_NAME = 0x000100,
|
||||
|
||||
// file system specific flags
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING = 0x0100,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING_WHILE_MOUNTED = 0x0200,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_CHECKING_WHILE_MOUNTED = 0x0400,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_REPAIRING_WHILE_MOUNTED = 0x0800,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_RESIZING_WHILE_MOUNTED = 0x1000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_MOVING_WHILE_MOUNTED = 0x2000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME_WHILE_MOUNTED = 0x4000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS_WHILE_MOUNTED = 0x8000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING = 0x001000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING_WHILE_MOUNTED = 0x002000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_CHECKING_WHILE_MOUNTED = 0x004000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_REPAIRING_WHILE_MOUNTED = 0x008000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_RESIZING_WHILE_MOUNTED = 0x010000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_MOVING_WHILE_MOUNTED = 0x020000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME_WHILE_MOUNTED = 0x040000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS_WHILE_MOUNTED = 0x080000,
|
||||
|
||||
// partitioning system specific flags
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_RESIZING_CHILD = 0x0100,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_MOVING_CHILD = 0x0200,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_NAME = 0x0400,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_TYPE = 0x0800,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_PARAMETERS = 0x1000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_CREATING_CHILD = 0x2000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_DELETING_CHILD = 0x4000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_INITIALIZING = 0x8000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_RESIZING_CHILD = 0x001000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_MOVING_CHILD = 0x002000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_NAME = 0x004000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_TYPE = 0x008000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_PARAMETERS = 0x010000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_CREATING_CHILD = 0x020000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_DELETING_CHILD = 0x040000,
|
||||
FSSH_B_DISK_SYSTEM_SUPPORTS_NAME = 0x080000,
|
||||
};
|
||||
|
||||
// disk device job types
|
||||
|
||||
@@ -54,7 +54,8 @@ extern "C" {
|
||||
|
||||
typedef struct fssh_file_system_module_info {
|
||||
struct fssh_module_info info;
|
||||
const char *pretty_name;
|
||||
const char* pretty_name;
|
||||
uint32_t flags; // DDM flags
|
||||
|
||||
/* scanning (the device is write locked) */
|
||||
float (*identify_partition)(int fd, fssh_partition_data *partition,
|
||||
@@ -239,19 +240,8 @@ typedef struct fssh_file_system_module_info {
|
||||
fssh_status_t (*rewind_query)(fssh_fs_volume fs, fssh_fs_cookie cookie);
|
||||
|
||||
/* capability querying (the device is read locked) */
|
||||
// ToDo: this will probably be combined to a single call
|
||||
bool (*supports_defragmenting)(fssh_partition_data *partition,
|
||||
bool *whileMounted);
|
||||
bool (*supports_repairing)(fssh_partition_data *partition,
|
||||
bool checkOnly, bool *whileMounted);
|
||||
bool (*supports_resizing)(fssh_partition_data *partition,
|
||||
bool *whileMounted);
|
||||
bool (*supports_moving)(fssh_partition_data *partition, bool *isNoOp);
|
||||
bool (*supports_setting_content_name)(fssh_partition_data *partition,
|
||||
bool *whileMounted);
|
||||
bool (*supports_setting_content_parameters)(fssh_partition_data *partition,
|
||||
bool *whileMounted);
|
||||
bool (*supports_initializing)(fssh_partition_data *partition);
|
||||
uint32_t (*get_supported_operations)(fssh_partition_data* partition,
|
||||
uint32_t mask);
|
||||
|
||||
bool (*validate_resize)(fssh_partition_data *partition, fssh_off_t *size);
|
||||
bool (*validate_move)(fssh_partition_data *partition, fssh_off_t *start);
|
||||
|
||||
Reference in New Issue
Block a user