4
4
/* Reiserfs block (de)allocator, bitmap-based. */
6
6
#include <linux/time.h>
7
#include <linux/reiserfs_fs.h>
8
8
#include <linux/errno.h>
9
9
#include <linux/buffer_head.h>
10
10
#include <linux/kernel.h>
11
11
#include <linux/pagemap.h>
12
12
#include <linux/vmalloc.h>
13
#include <linux/reiserfs_fs_sb.h>
14
#include <linux/reiserfs_fs_i.h>
15
13
#include <linux/quotaops.h>
14
#include <linux/seq_file.h>
17
16
#define PREALLOCATION_SIZE 9
636
static void print_sep(struct seq_file *seq, int *first)
644
void show_alloc_options(struct seq_file *seq, struct super_block *s)
648
if (SB_ALLOC_OPTS(s) == ((1 << _ALLOC_skip_busy) |
649
(1 << _ALLOC_dirid_groups) | (1 << _ALLOC_packing_groups)))
652
seq_puts(seq, ",alloc=");
654
if (TEST_OPTION(concentrating_formatted_nodes, s)) {
655
print_sep(seq, &first);
656
if (REISERFS_SB(s)->s_alloc_options.border != 10) {
657
seq_printf(seq, "concentrating_formatted_nodes=%d",
658
100 / REISERFS_SB(s)->s_alloc_options.border);
660
seq_puts(seq, "concentrating_formatted_nodes");
662
if (TEST_OPTION(displacing_large_files, s)) {
663
print_sep(seq, &first);
664
if (REISERFS_SB(s)->s_alloc_options.large_file_size != 16) {
665
seq_printf(seq, "displacing_large_files=%lu",
666
REISERFS_SB(s)->s_alloc_options.large_file_size);
668
seq_puts(seq, "displacing_large_files");
670
if (TEST_OPTION(displacing_new_packing_localities, s)) {
671
print_sep(seq, &first);
672
seq_puts(seq, "displacing_new_packing_localities");
674
if (TEST_OPTION(old_hashed_relocation, s)) {
675
print_sep(seq, &first);
676
seq_puts(seq, "old_hashed_relocation");
678
if (TEST_OPTION(new_hashed_relocation, s)) {
679
print_sep(seq, &first);
680
seq_puts(seq, "new_hashed_relocation");
682
if (TEST_OPTION(dirid_groups, s)) {
683
print_sep(seq, &first);
684
seq_puts(seq, "dirid_groups");
686
if (TEST_OPTION(oid_groups, s)) {
687
print_sep(seq, &first);
688
seq_puts(seq, "oid_groups");
690
if (TEST_OPTION(packing_groups, s)) {
691
print_sep(seq, &first);
692
seq_puts(seq, "packing_groups");
694
if (TEST_OPTION(hashed_formatted_nodes, s)) {
695
print_sep(seq, &first);
696
seq_puts(seq, "hashed_formatted_nodes");
698
if (TEST_OPTION(skip_busy, s)) {
699
print_sep(seq, &first);
700
seq_puts(seq, "skip_busy");
702
if (TEST_OPTION(hundredth_slices, s)) {
703
print_sep(seq, &first);
704
seq_puts(seq, "hundredth_slices");
706
if (TEST_OPTION(old_way, s)) {
707
print_sep(seq, &first);
708
seq_puts(seq, "old_way");
710
if (TEST_OPTION(displace_based_on_dirid, s)) {
711
print_sep(seq, &first);
712
seq_puts(seq, "displace_based_on_dirid");
714
if (REISERFS_SB(s)->s_alloc_options.preallocmin != 0) {
715
print_sep(seq, &first);
716
seq_printf(seq, "preallocmin=%d",
717
REISERFS_SB(s)->s_alloc_options.preallocmin);
719
if (REISERFS_SB(s)->s_alloc_options.preallocsize != 17) {
720
print_sep(seq, &first);
721
seq_printf(seq, "preallocsize=%d",
722
REISERFS_SB(s)->s_alloc_options.preallocsize);
637
726
static inline void new_hashed_relocation(reiserfs_blocknr_hint_t * hint)