18c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/unregister 28c2ecf20Sopenharmony_ciDate: November 2010 38c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 48c2ecf20Sopenharmony_ciDescription: 58c2ecf20Sopenharmony_ci A write to this file causes the backing device or cache to be 68c2ecf20Sopenharmony_ci unregistered. If a backing device had dirty data in the cache, 78c2ecf20Sopenharmony_ci writeback mode is automatically disabled and all dirty data is 88c2ecf20Sopenharmony_ci flushed before the device is unregistered. Caches unregister 98c2ecf20Sopenharmony_ci all associated backing devices before unregistering themselves. 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/clear_stats 128c2ecf20Sopenharmony_ciDate: November 2010 138c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 148c2ecf20Sopenharmony_ciDescription: 158c2ecf20Sopenharmony_ci Writing to this file resets all the statistics for the device. 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/cache 188c2ecf20Sopenharmony_ciDate: November 2010 198c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 208c2ecf20Sopenharmony_ciDescription: 218c2ecf20Sopenharmony_ci For a backing device that has cache, a symlink to 228c2ecf20Sopenharmony_ci the bcache/ dir of that cache. 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/cache_hits 258c2ecf20Sopenharmony_ciDate: November 2010 268c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 278c2ecf20Sopenharmony_ciDescription: 288c2ecf20Sopenharmony_ci For backing devices: integer number of full cache hits, 298c2ecf20Sopenharmony_ci counted per bio. A partial cache hit counts as a miss. 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/cache_misses 328c2ecf20Sopenharmony_ciDate: November 2010 338c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 348c2ecf20Sopenharmony_ciDescription: 358c2ecf20Sopenharmony_ci For backing devices: integer number of cache misses. 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/cache_hit_ratio 388c2ecf20Sopenharmony_ciDate: November 2010 398c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 408c2ecf20Sopenharmony_ciDescription: 418c2ecf20Sopenharmony_ci For backing devices: cache hits as a percentage. 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/sequential_cutoff 448c2ecf20Sopenharmony_ciDate: November 2010 458c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 468c2ecf20Sopenharmony_ciDescription: 478c2ecf20Sopenharmony_ci For backing devices: Threshold past which sequential IO will 488c2ecf20Sopenharmony_ci skip the cache. Read and written as bytes in human readable 498c2ecf20Sopenharmony_ci units (i.e. echo 10M > sequntial_cutoff). 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/bypassed 528c2ecf20Sopenharmony_ciDate: November 2010 538c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 548c2ecf20Sopenharmony_ciDescription: 558c2ecf20Sopenharmony_ci Sum of all reads and writes that have bypassed the cache (due 568c2ecf20Sopenharmony_ci to the sequential cutoff). Expressed as bytes in human 578c2ecf20Sopenharmony_ci readable units. 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/writeback 608c2ecf20Sopenharmony_ciDate: November 2010 618c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 628c2ecf20Sopenharmony_ciDescription: 638c2ecf20Sopenharmony_ci For backing devices: When on, writeback caching is enabled and 648c2ecf20Sopenharmony_ci writes will be buffered in the cache. When off, caching is in 658c2ecf20Sopenharmony_ci writethrough mode; reads and writes will be added to the 668c2ecf20Sopenharmony_ci cache but no write buffering will take place. 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/writeback_running 698c2ecf20Sopenharmony_ciDate: November 2010 708c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 718c2ecf20Sopenharmony_ciDescription: 728c2ecf20Sopenharmony_ci For backing devices: when off, dirty data will not be written 738c2ecf20Sopenharmony_ci from the cache to the backing device. The cache will still be 748c2ecf20Sopenharmony_ci used to buffer writes until it is mostly full, at which point 758c2ecf20Sopenharmony_ci writes transparently revert to writethrough mode. Intended only 768c2ecf20Sopenharmony_ci for benchmarking/testing. 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/writeback_delay 798c2ecf20Sopenharmony_ciDate: November 2010 808c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 818c2ecf20Sopenharmony_ciDescription: 828c2ecf20Sopenharmony_ci For backing devices: In writeback mode, when dirty data is 838c2ecf20Sopenharmony_ci written to the cache and the cache held no dirty data for that 848c2ecf20Sopenharmony_ci backing device, writeback from cache to backing device starts 858c2ecf20Sopenharmony_ci after this delay, expressed as an integer number of seconds. 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/writeback_percent 888c2ecf20Sopenharmony_ciDate: November 2010 898c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 908c2ecf20Sopenharmony_ciDescription: 918c2ecf20Sopenharmony_ci For backing devices: If nonzero, writeback from cache to 928c2ecf20Sopenharmony_ci backing device only takes place when more than this percentage 938c2ecf20Sopenharmony_ci of the cache is used, allowing more write coalescing to take 948c2ecf20Sopenharmony_ci place and reducing total number of writes sent to the backing 958c2ecf20Sopenharmony_ci device. Integer between 0 and 40. 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/synchronous 988c2ecf20Sopenharmony_ciDate: November 2010 998c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 1008c2ecf20Sopenharmony_ciDescription: 1018c2ecf20Sopenharmony_ci For a cache, a boolean that allows synchronous mode to be 1028c2ecf20Sopenharmony_ci switched on and off. In synchronous mode all writes are ordered 1038c2ecf20Sopenharmony_ci such that the cache can reliably recover from unclean shutdown; 1048c2ecf20Sopenharmony_ci if disabled bcache will not generally wait for writes to 1058c2ecf20Sopenharmony_ci complete but if the cache is not shut down cleanly all data 1068c2ecf20Sopenharmony_ci will be discarded from the cache. Should not be turned off with 1078c2ecf20Sopenharmony_ci writeback caching enabled. 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/discard 1108c2ecf20Sopenharmony_ciDate: November 2010 1118c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 1128c2ecf20Sopenharmony_ciDescription: 1138c2ecf20Sopenharmony_ci For a cache, a boolean allowing discard/TRIM to be turned off 1148c2ecf20Sopenharmony_ci or back on if the device supports it. 1158c2ecf20Sopenharmony_ci 1168c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/bucket_size 1178c2ecf20Sopenharmony_ciDate: November 2010 1188c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 1198c2ecf20Sopenharmony_ciDescription: 1208c2ecf20Sopenharmony_ci For a cache, bucket size in human readable units, as set at 1218c2ecf20Sopenharmony_ci cache creation time; should match the erase block size of the 1228c2ecf20Sopenharmony_ci SSD for optimal performance. 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/nbuckets 1258c2ecf20Sopenharmony_ciDate: November 2010 1268c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 1278c2ecf20Sopenharmony_ciDescription: 1288c2ecf20Sopenharmony_ci For a cache, the number of usable buckets. 1298c2ecf20Sopenharmony_ci 1308c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/tree_depth 1318c2ecf20Sopenharmony_ciDate: November 2010 1328c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 1338c2ecf20Sopenharmony_ciDescription: 1348c2ecf20Sopenharmony_ci For a cache, height of the btree excluding leaf nodes (i.e. a 1358c2ecf20Sopenharmony_ci one node tree will have a depth of 0). 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/btree_cache_size 1388c2ecf20Sopenharmony_ciDate: November 2010 1398c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 1408c2ecf20Sopenharmony_ciDescription: 1418c2ecf20Sopenharmony_ci Number of btree buckets/nodes that are currently cached in 1428c2ecf20Sopenharmony_ci memory; cache dynamically grows and shrinks in response to 1438c2ecf20Sopenharmony_ci memory pressure from the rest of the system. 1448c2ecf20Sopenharmony_ci 1458c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/written 1468c2ecf20Sopenharmony_ciDate: November 2010 1478c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 1488c2ecf20Sopenharmony_ciDescription: 1498c2ecf20Sopenharmony_ci For a cache, total amount of data in human readable units 1508c2ecf20Sopenharmony_ci written to the cache, excluding all metadata. 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/bcache/btree_written 1538c2ecf20Sopenharmony_ciDate: November 2010 1548c2ecf20Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 1558c2ecf20Sopenharmony_ciDescription: 1568c2ecf20Sopenharmony_ci For a cache, sum of all btree writes in human readable units. 157