162306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/unregister 262306a36Sopenharmony_ciDate: November 2010 362306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 462306a36Sopenharmony_ciDescription: 562306a36Sopenharmony_ci A write to this file causes the backing device or cache to be 662306a36Sopenharmony_ci unregistered. If a backing device had dirty data in the cache, 762306a36Sopenharmony_ci writeback mode is automatically disabled and all dirty data is 862306a36Sopenharmony_ci flushed before the device is unregistered. Caches unregister 962306a36Sopenharmony_ci all associated backing devices before unregistering themselves. 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/clear_stats 1262306a36Sopenharmony_ciDate: November 2010 1362306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 1462306a36Sopenharmony_ciDescription: 1562306a36Sopenharmony_ci Writing to this file resets all the statistics for the device. 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/cache 1862306a36Sopenharmony_ciDate: November 2010 1962306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 2062306a36Sopenharmony_ciDescription: 2162306a36Sopenharmony_ci For a backing device that has cache, a symlink to 2262306a36Sopenharmony_ci the bcache/ dir of that cache. 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/cache_hits 2562306a36Sopenharmony_ciDate: November 2010 2662306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 2762306a36Sopenharmony_ciDescription: 2862306a36Sopenharmony_ci For backing devices: integer number of full cache hits, 2962306a36Sopenharmony_ci counted per bio. A partial cache hit counts as a miss. 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/cache_misses 3262306a36Sopenharmony_ciDate: November 2010 3362306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 3462306a36Sopenharmony_ciDescription: 3562306a36Sopenharmony_ci For backing devices: integer number of cache misses. 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/cache_hit_ratio 3862306a36Sopenharmony_ciDate: November 2010 3962306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 4062306a36Sopenharmony_ciDescription: 4162306a36Sopenharmony_ci For backing devices: cache hits as a percentage. 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/sequential_cutoff 4462306a36Sopenharmony_ciDate: November 2010 4562306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 4662306a36Sopenharmony_ciDescription: 4762306a36Sopenharmony_ci For backing devices: Threshold past which sequential IO will 4862306a36Sopenharmony_ci skip the cache. Read and written as bytes in human readable 4962306a36Sopenharmony_ci units (i.e. echo 10M > sequntial_cutoff). 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/bypassed 5262306a36Sopenharmony_ciDate: November 2010 5362306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 5462306a36Sopenharmony_ciDescription: 5562306a36Sopenharmony_ci Sum of all reads and writes that have bypassed the cache (due 5662306a36Sopenharmony_ci to the sequential cutoff). Expressed as bytes in human 5762306a36Sopenharmony_ci readable units. 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/writeback 6062306a36Sopenharmony_ciDate: November 2010 6162306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 6262306a36Sopenharmony_ciDescription: 6362306a36Sopenharmony_ci For backing devices: When on, writeback caching is enabled and 6462306a36Sopenharmony_ci writes will be buffered in the cache. When off, caching is in 6562306a36Sopenharmony_ci writethrough mode; reads and writes will be added to the 6662306a36Sopenharmony_ci cache but no write buffering will take place. 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/writeback_running 6962306a36Sopenharmony_ciDate: November 2010 7062306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 7162306a36Sopenharmony_ciDescription: 7262306a36Sopenharmony_ci For backing devices: when off, dirty data will not be written 7362306a36Sopenharmony_ci from the cache to the backing device. The cache will still be 7462306a36Sopenharmony_ci used to buffer writes until it is mostly full, at which point 7562306a36Sopenharmony_ci writes transparently revert to writethrough mode. Intended only 7662306a36Sopenharmony_ci for benchmarking/testing. 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/writeback_delay 7962306a36Sopenharmony_ciDate: November 2010 8062306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 8162306a36Sopenharmony_ciDescription: 8262306a36Sopenharmony_ci For backing devices: In writeback mode, when dirty data is 8362306a36Sopenharmony_ci written to the cache and the cache held no dirty data for that 8462306a36Sopenharmony_ci backing device, writeback from cache to backing device starts 8562306a36Sopenharmony_ci after this delay, expressed as an integer number of seconds. 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/writeback_percent 8862306a36Sopenharmony_ciDate: November 2010 8962306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 9062306a36Sopenharmony_ciDescription: 9162306a36Sopenharmony_ci For backing devices: If nonzero, writeback from cache to 9262306a36Sopenharmony_ci backing device only takes place when more than this percentage 9362306a36Sopenharmony_ci of the cache is used, allowing more write coalescing to take 9462306a36Sopenharmony_ci place and reducing total number of writes sent to the backing 9562306a36Sopenharmony_ci device. Integer between 0 and 40. 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/synchronous 9862306a36Sopenharmony_ciDate: November 2010 9962306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 10062306a36Sopenharmony_ciDescription: 10162306a36Sopenharmony_ci For a cache, a boolean that allows synchronous mode to be 10262306a36Sopenharmony_ci switched on and off. In synchronous mode all writes are ordered 10362306a36Sopenharmony_ci such that the cache can reliably recover from unclean shutdown; 10462306a36Sopenharmony_ci if disabled bcache will not generally wait for writes to 10562306a36Sopenharmony_ci complete but if the cache is not shut down cleanly all data 10662306a36Sopenharmony_ci will be discarded from the cache. Should not be turned off with 10762306a36Sopenharmony_ci writeback caching enabled. 10862306a36Sopenharmony_ci 10962306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/discard 11062306a36Sopenharmony_ciDate: November 2010 11162306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 11262306a36Sopenharmony_ciDescription: 11362306a36Sopenharmony_ci For a cache, a boolean allowing discard/TRIM to be turned off 11462306a36Sopenharmony_ci or back on if the device supports it. 11562306a36Sopenharmony_ci 11662306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/bucket_size 11762306a36Sopenharmony_ciDate: November 2010 11862306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 11962306a36Sopenharmony_ciDescription: 12062306a36Sopenharmony_ci For a cache, bucket size in human readable units, as set at 12162306a36Sopenharmony_ci cache creation time; should match the erase block size of the 12262306a36Sopenharmony_ci SSD for optimal performance. 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/nbuckets 12562306a36Sopenharmony_ciDate: November 2010 12662306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 12762306a36Sopenharmony_ciDescription: 12862306a36Sopenharmony_ci For a cache, the number of usable buckets. 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/tree_depth 13162306a36Sopenharmony_ciDate: November 2010 13262306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 13362306a36Sopenharmony_ciDescription: 13462306a36Sopenharmony_ci For a cache, height of the btree excluding leaf nodes (i.e. a 13562306a36Sopenharmony_ci one node tree will have a depth of 0). 13662306a36Sopenharmony_ci 13762306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/btree_cache_size 13862306a36Sopenharmony_ciDate: November 2010 13962306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 14062306a36Sopenharmony_ciDescription: 14162306a36Sopenharmony_ci Number of btree buckets/nodes that are currently cached in 14262306a36Sopenharmony_ci memory; cache dynamically grows and shrinks in response to 14362306a36Sopenharmony_ci memory pressure from the rest of the system. 14462306a36Sopenharmony_ci 14562306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/written 14662306a36Sopenharmony_ciDate: November 2010 14762306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 14862306a36Sopenharmony_ciDescription: 14962306a36Sopenharmony_ci For a cache, total amount of data in human readable units 15062306a36Sopenharmony_ci written to the cache, excluding all metadata. 15162306a36Sopenharmony_ci 15262306a36Sopenharmony_ciWhat: /sys/block/<disk>/bcache/btree_written 15362306a36Sopenharmony_ciDate: November 2010 15462306a36Sopenharmony_ciContact: Kent Overstreet <kent.overstreet@gmail.com> 15562306a36Sopenharmony_ciDescription: 15662306a36Sopenharmony_ci For a cache, sum of all btree writes in human readable units. 157