Theodore Ts'o <tytso <at> mit.edu> writes: > #define Z_FLAGS_FULL 0x0001 > #define Z_FLAGS_OFFLINE 0x0002 > #define Z_FLAGS_RO 0x0004 > #define Z_FLAG_RESET_REQUESTED 0x0008 > > #define Z_FLAG_TYPE_MASK 0x0F00 > #define Z_FLAG_TYPE_CONVENTIONAL 0x0000 > #define Z_FLAG_TYPE_SEQUENTIAL 0x0100 Just a minor point, but I noticed that the specification (14-010r1) had an ordering for these flags in the zone descriptor format (Table 6) in a different way from the above #define's. I thought it might be handy to have these sync up? For example: #define Z_FLAG_RESET_REQUESTED 0x0001 #define Z_FLAGS_OFFLINE 0x0002 #define Z_FLAGS_RO 0x0004 #define Z_FLAGS_FULL 0x0008 #define Z_FLAG_TYPE_MASK 0x0F00 #define Z_FLAG_TYPE_CONVENTIONAL 0x0100 (Table 1 in 14-009r1) #define Z_FLAG_TYPE_SEQUENTIAL 0x0200 (Table 1 in 14-009r1) Or to be little-endian: #define Z_FLAG_TYPE_MASK 0x000F #define Z_FLAG_TYPE_CONVENTIONAL 0x0001 (Table 1 in 14-009r1) #define Z_FLAG_TYPE_SEQUENTIAL 0x0002 (Table 1 in 14-009r1) #define Z_FLAG_RESET_REQUESTED 0x0100 #define Z_FLAGS_OFFLINE 0x0200 #define Z_FLAGS_RO 0x0400 #define Z_FLAGS_FULL 0x0800 > * If free_sectors_criteria is positive, then return zones that have > * at least that many sectors available to be written. If it is zero, > * then match all zones. If free_sectors_criteria is negative, then > * return the zones that match the following criteria: > * > * -1 Return all read-only zones > * -2 Return all offline zones > * -3 Return all zones where the write ptr != the checkpoint ptr "all" above for -1/-2/-3 is still limited by (int) max_zones, correct? I was also wondering whether the returned (struct) zone_status'es should have any ordering, e.g., if they should preserve the ordering given by the drive. According to the specification for REPORT ZONES, "The descriptors shall be sorted in ascending order based on the zone start LBA value." If this ordering is preserved, maybe it will help to reduce seek distance (assuming correlation between ascending LBA and going from OD to ID)? Han -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html