• Alexander Viro's avatar
    [PATCH] 32-bit dev_t: internal use · 40d2adc6
    Alexander Viro authored
    Starting the conversion:
    	* internal dev_t made 32bit.
    	* new helpers - new_encode_dev(), new_decode_dev(), huge_encode_dev(),
    huge_decode_dev(), new_valid_dev().  They do encoding/decoding of 32bit and
    64bit values; for now huge_... are aliases for new_... and new_valid_dev()
    is always true.  We do 12:20 for 32bit; representation is compatible with
    16bit one - we have major in bits 19--8 and minor in 31--20,7--0.  That's
    what the userland sees; internally we have (major << 20)|minor, of course.
    	* MKDEV(), MAJOR() and MINOR() updated.
    	* several places used to handle Missed'em'V dev_t (14:18 split)
    manually; that stuff had been taken into common helpers.
    	Now we can start replacing old_... with new_... and huge_..., depending
    on the width available.  MKDEV() callers should (for now) make sure that major
    and minor are within 12:20.  That's what the next chunk will do.
    40d2adc6
libfs.c 9.69 KB