⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 evms_os2.h

📁 unxi下共享内存的使用
💻 H
📖 第 1 页 / 共 2 页
字号:
        u_int32_t      Sector_Count;      /* The number of sectors in this partition. */} Partition_Record;typedef struct _Master_Boot_Record { /* MBR */        unsigned char     Reserved[446];        Partition_Record  Partition_Table[4];        u_int16_t    Signature;            /* AA55h in this field indicates that this is a valid partition table/MBR. */} Master_Boot_Record;typedef Master_Boot_Record  Extended_Boot_Record;/* The following definition covers the Boot Manager Alias Table in the EBR.   The Alias Table in the EBR has 2 entries in it, although only the first one is actually used.  */#define ALIAS_NAME_SIZE  8typedef struct _AliasTableEntry { /* ATE */        unsigned char  On_Boot_Manager_Menu;        char           Name[ALIAS_NAME_SIZE];} AliasTableEntry;#define ALIAS_TABLE_OFFSET  0x18A/* XLATOFF *//* The following text is used for the Boot Manager Alias for items that were placed on the Boot Manager Menu by FDISK and   which have since been migrated to the new LVM format.  This text is put into the Name field of an AliasTableEntry so   that, if FDISK ( or another program which understands the old Boot Manager Menu format) is run, it will display   something for those partitions/volumes which are on the Boot Manager Menu.   NOTE: This text must be exactly ALIAS_NAME_SIZE characters in length!                                                     */#define ALIAS_TABLE_ENTRY_MIGRATION_TEXT       "--> LVM "#define ALIAS_TABLE_ENTRY_MIGRATION_TEXT2      "--> LVM*"/* XLATON *//* The following is the signature used for an Master Boot Record, an Extended Boot Record, and a Boot Sector. */#define MBR_EBR_SIGNATURE  0xAA55/* The following list of definitions defines the values of interest for the Format_Indicator in a Partition_Record. */#define EBR_INDICATOR                          0x5#define WINDOZE_EBR_INDICATOR                  0xF#define UNUSED_INDICATOR                       0x0#define IFS_INDICATOR                          0x7#define FAT12_INDICATOR                        0x1#define FAT16_SMALL_PARTITION_INDICATOR        0x4#define FAT16_LARGE_PARTITION_INDICATOR        0x6#define BOOT_MANAGER_HIDDEN_PARTITION_FLAG     0x10#define LVM_PARTITION_INDICATOR                0x35#define BOOT_MANAGER_INDICATOR                 0x0A/* The following is the signature used in the Boot Sector for Boot Manager. */#define OS2LVM_BOOT_MANAGER_SIGNATURE       "APJ&WN"/* The following is used for determining the synthetic geometry reported for Volumes employing drive linking. */#define OS2LVM_SYNTHETIC_SECTORS_PER_TRACK  63/*-------------------------------------------------- * Declares for Drive Linking feature: *--------------------------------------------------*//* The following defines uniquely identify Drive Linking. */#define DRIVE_LINKING_FEATURE_ID     100#define DRIVE_LINKING_MAJOR_VERSION  1#define DRIVE_LINKING_MINOR_VERSION  0/* The following definitions are used for the disk structures supporting drive linking. */#define LINK_TABLE_MASTER_SIGNATURE  0x434E4157L#define LINK_TABLE_SIGNATURE         0X4D4D5652L#define MAXIMUM_LINKS   246#define DRIVE_LINKING_RESERVED_SECTOR_COUNT 4#define LINKS_IN_FIRST_SECTOR 60#define LINKS_IN_NEXT_SECTOR  62typedef struct _Drive_Link {        u_int32_t   Drive_Serial_Number;        u_int32_t   Partition_Serial_Number;} Drive_Link;typedef struct _LVM_Link_Table_First_Sector {        u_int32_t   Link_Table_Signature;  /* Use the LINK_TABLE_MASTER_SIGNATURE here. */        u_int32_t   Link_Table_CRC;        u_int32_t   Sequence_Number;       /* Used to resolve conflicts when the primary and secondary tables do not match. */        u_int32_t   Links_In_Use;        Drive_Link  Link_Table[LINKS_IN_FIRST_SECTOR];} LVM_Link_Table_First_Sector;typedef struct _LVM_Link_Table_Sector {        u_int32_t   Link_Table_Signature;  /* Use LINK_TABLE_SIGNATURE here. */        u_int32_t   Link_Table_CRC;        u_int32_t   Sequence_Number;       /* Used to resolve conflicts when the primary and secondary tables do not match. */        Drive_Link  Link_Table[LINKS_IN_NEXT_SECTOR];} LVM_Link_Table_Sector;/*-------------------------------------------------- * Declares for Bad Block Relocation feature: *--------------------------------------------------*//* The following definition is the numeric ID for Bad Block Relocation.  */#define BBR_FEATURE_ID  101#define BBR_FEATURE_MAJOR_VERSION       0x0001#define BBR_FEATURE_MINOR_VERSION       0x0000/* The following definitions are used for the disk structures supporting bad block relocation. *//* NOTE: BBR stands for Bad Block Relocation. */#define BBR_TABLE_MASTER_SIGNATURE  0x00726D62#define BBR_TABLE_SIGNATURE         0x01726276typedef struct _BBR_Table_Entry {        u_int32_t    BadSector;        u_int32_t    ReplacementSector;} BBR_Table_Entry;typedef struct _LVM_BBR_Table_First_Sector {        u_int32_t    Signature;   /* Signature for the first sector of the BBR Table. Use BBR_TABLE_MASTER_SIGNATURE here.*/        u_int32_t    CRC;/* CRC for this sector.*/        u_int32_t    Sequence_Number;     /* Used to resolve conflicts when the primary and secondary tables do not match.*/        u_int32_t    Table_Size;  /* The number of BBR_Table_Entries in the BBR Table.*/        u_int32_t    Table_Entries_In_Use;/* The number of BBR Table entries which are in use.*/        u_int32_t    Sectors_Per_Table;   /* The number of LVM_BBR_Table_Sectors used to hold the BBR Table.*/        u_int32_t    First_Replacement_Sector;    /* The location of the first replacement sector.*/        u_int32_t    Last_Replacement_Sector;     /* The location of the last replacement sector.*/        u_int32_t    Replacement_Sector_Count;    /* The number of replacement sectors.*/        u_int32_t    Flags;       /* Flags global to the Bad Block Relocation Feature.*/} LVM_BBR_Table_First_Sector;/*  Flags for LVM_BBR_Table_First_Sector  */#define BBR_Flag_Write_Verify    0x00000001/* Indicate convert Write I/O to Write/Verify*/#define BBR_TABLE_ENTRIES_PER_SECTOR   62typedef struct _LVM_BBR_Table_Sector {        u_int32_t    Signature;/* Signature for a sector of the BBR_Table which is not the first sector of the BBR Table. Use BBR_TABLE_SIGNATURE here.*/        u_int32_t    CRC;/* CRC for this sector of the BBR Table.*/        u_int32_t    Sequence_Number;   /* Used to resolve conflicts when the primary and secondary tables do not match.*/        BBR_Table_Entry  BBR_Table[BBR_TABLE_ENTRIES_PER_SECTOR];        u_int32_t    reserved1;/* for block alignment*/} LVM_BBR_Table_Sector;//// Combined structure to hold entire BBR feature data as it exists on disk.typedef struct _LVM_BBR_Feature{        LVM_BBR_Table_First_Sector  control;        char                  reserved1[OS2_BYTES_PER_SECTOR - sizeof(LVM_BBR_Table_First_Sector)];        LVM_BBR_Table_Sector  remap[1];} LVM_BBR_Feature;/* The following defines establish the minimum and maximum number of replacement sectors which can be allocated for   Bad Block Relocation.  Otherwise, 1 replacement sector per MB of disk space is allocated.                          */#define BBR_FLOOR    62#define BBR_LIMIT  4096#ifdef __KERNEL__// In-memory Meta Data for Bad Block Relocation// In-memory Meta Data for Drive Linkingtypedef struct os2_drivelink_runtime_entry_s {        evms_sector_t                   start_sector;        evms_sector_t                   sector_count;        evms_sector_t                   Drive_Link_Data_Copy1;    /* LSN of first on-disk copy of drive linking data. */        evms_sector_t                   Drive_Link_Data_Copy2;    /* LSN of the second on-disk copy of drive linking data. */        char                           *link_data;        u_int32_t                       Partition_Serial_Number;        evms_sector_t                   BBR_Data_Copy1;           /* LSN of the first on-disk copy of the BBR data.*/        evms_sector_t                   BBR_Data_Copy2;           /* LSN of the second on-disk copy of the BBR data.*/        u_int32_t                       BBR_Feature_Size;         /* # of sectors of BBR data. */        u_int32_t                       bbr_is_active;        struct semaphore                BBR_Table_Lock;            /* Used to serialize writers */        unsigned int                    Guard1;                    /* Lamport's Theorem for mutual exclusion */        char                           *bbr_data;        unsigned int                    Guard2;                    /* Lamport's Theorem for mutual exclusion */        evms_logical_node_t            *link_partition;        struct os2_drivelink_runtime_entry_s  *next;} os2_drivelink_runtime_entry_t;// In-memory Meta Data for each OS/2 LVM Volume:typedef struct os2_volume_runtime_entry_s {        int                             complete;        u_int32_t                       Export_Needed;        evms_sector_t                   size_in_sectors;        u_int32_t                       Volume_Serial_Number;        u_int32_t                       drive_link_count;        os2_drivelink_runtime_entry_t  *drive_link;        evms_logical_node_t            *next_os2lvm_node;} os2_volume_runtime_entry_t;#endif#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -