mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	bcachefs: bch_acct_rebalance_work
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
		
							parent
							
								
									6af91147b6
								
							
						
					
					
						commit
						20ac515a9c
					
				
					 2 changed files with 11 additions and 1 deletions
				
			
		| 
						 | 
					@ -808,6 +808,15 @@ static int __trigger_extent(struct btree_trans *trans,
 | 
				
			||||||
			return ret;
 | 
								return ret;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (bch2_bkey_rebalance_opts(k)) {
 | 
				
			||||||
 | 
							struct disk_accounting_pos acc = {
 | 
				
			||||||
 | 
								.type		= BCH_DISK_ACCOUNTING_rebalance_work,
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							ret = bch2_disk_accounting_mod(trans, &acc, &replicas_sectors, 1, gc);
 | 
				
			||||||
 | 
							if (ret)
 | 
				
			||||||
 | 
								return ret;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -102,7 +102,8 @@ static inline bool data_type_is_hidden(enum bch_data_type type)
 | 
				
			||||||
	x(dev_data_type,	3)		\
 | 
						x(dev_data_type,	3)		\
 | 
				
			||||||
	x(compression,		4)		\
 | 
						x(compression,		4)		\
 | 
				
			||||||
	x(snapshot,		5)		\
 | 
						x(snapshot,		5)		\
 | 
				
			||||||
	x(btree,		6)
 | 
						x(btree,		6)		\
 | 
				
			||||||
 | 
						x(rebalance_work,	7)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum disk_accounting_type {
 | 
					enum disk_accounting_type {
 | 
				
			||||||
#define x(f, nr)	BCH_DISK_ACCOUNTING_##f	= nr,
 | 
					#define x(f, nr)	BCH_DISK_ACCOUNTING_##f	= nr,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue