~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/bcachefs/compress.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /fs/bcachefs/compress.h (Version linux-6.12-rc7) and /fs/bcachefs/compress.h (Version linux-5.0.21)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 
  2 #ifndef _BCACHEFS_COMPRESS_H                      
  3 #define _BCACHEFS_COMPRESS_H                      
  4                                                   
  5 #include "extents_types.h"                        
  6                                                   
  7 static const unsigned __bch2_compression_opt_t    
  8 #define x(t, n) [BCH_COMPRESSION_OPT_##t] = BC    
  9         BCH_COMPRESSION_OPTS()                    
 10 #undef x                                          
 11 };                                                
 12                                                   
 13 struct bch_compression_opt {                      
 14         u8              type:4,                   
 15                         level:4;                  
 16 };                                                
 17                                                   
 18 static inline struct bch_compression_opt __bch    
 19 {                                                 
 20         return (struct bch_compression_opt) {     
 21                 .type   = v & 15,                 
 22                 .level  = v >> 4,                 
 23         };                                        
 24 }                                                 
 25                                                   
 26 static inline bool bch2_compression_opt_valid(    
 27 {                                                 
 28         struct bch_compression_opt opt = __bch    
 29                                                   
 30         return opt.type < ARRAY_SIZE(__bch2_co    
 31 }                                                 
 32                                                   
 33 static inline struct bch_compression_opt bch2_    
 34 {                                                 
 35         return bch2_compression_opt_valid(v)      
 36                 ? __bch2_compression_decode(v)    
 37                 : (struct bch_compression_opt)    
 38 }                                                 
 39                                                   
 40 static inline unsigned bch2_compression_encode    
 41 {                                                 
 42         return opt.type|(opt.level << 4);         
 43 }                                                 
 44                                                   
 45 static inline enum bch_compression_type bch2_c    
 46 {                                                 
 47         return __bch2_compression_opt_to_type[    
 48 }                                                 
 49                                                   
 50 int bch2_bio_uncompress_inplace(struct bch_fs     
 51                                 struct bch_ext    
 52 int bch2_bio_uncompress(struct bch_fs *, struc    
 53                        struct bvec_iter, struc    
 54 unsigned bch2_bio_compress(struct bch_fs *, st    
 55                            struct bio *, size_    
 56                                                   
 57 int bch2_check_set_has_compressed_data(struct     
 58 void bch2_fs_compress_exit(struct bch_fs *);      
 59 int bch2_fs_compress_init(struct bch_fs *);       
 60                                                   
 61 void bch2_compression_opt_to_text(struct print    
 62                                                   
 63 int bch2_opt_compression_parse(struct bch_fs *    
 64 void bch2_opt_compression_to_text(struct print    
 65 int bch2_opt_compression_validate(u64, struct     
 66                                                   
 67 #define bch2_opt_compression (struct bch_opt_f    
 68         .parse          = bch2_opt_compression    
 69         .to_text        = bch2_opt_compression    
 70         .validate       = bch2_opt_compression    
 71 }                                                 
 72                                                   
 73 #endif /* _BCACHEFS_COMPRESS_H */                 
 74                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php