dquot.c (46557bef3f3834ac33031c7be27d39d90d507442) | dquot.c (6d4561110a3e9fa742aeec6717248a491dfb1878) |
---|---|
1/* 2 * Implementation of the diskquota system for the LINUX operating system. QUOTA 3 * is implemented using the BSD system call interface as the means of 4 * communication with the user level. This file contains the generic routines 5 * called by the different filesystems on allocation of an inode or block. 6 * These routines take care of the administration needed to have a consistent 7 * diskquota tracking system. The ideas of both user and group quotas are based 8 * on the Melbourne quota system as used on BSD derived systems. The internal --- 2459 unchanged lines hidden (view full) --- 2468 .get_info = vfs_get_dqinfo, 2469 .set_info = vfs_set_dqinfo, 2470 .get_dqblk = vfs_get_dqblk, 2471 .set_dqblk = vfs_set_dqblk 2472}; 2473 2474static ctl_table fs_dqstats_table[] = { 2475 { | 1/* 2 * Implementation of the diskquota system for the LINUX operating system. QUOTA 3 * is implemented using the BSD system call interface as the means of 4 * communication with the user level. This file contains the generic routines 5 * called by the different filesystems on allocation of an inode or block. 6 * These routines take care of the administration needed to have a consistent 7 * diskquota tracking system. The ideas of both user and group quotas are based 8 * on the Melbourne quota system as used on BSD derived systems. The internal --- 2459 unchanged lines hidden (view full) --- 2468 .get_info = vfs_get_dqinfo, 2469 .set_info = vfs_set_dqinfo, 2470 .get_dqblk = vfs_get_dqblk, 2471 .set_dqblk = vfs_set_dqblk 2472}; 2473 2474static ctl_table fs_dqstats_table[] = { 2475 { |
2476 .ctl_name = FS_DQ_LOOKUPS, | |
2477 .procname = "lookups", 2478 .data = &dqstats.lookups, 2479 .maxlen = sizeof(int), 2480 .mode = 0444, | 2476 .procname = "lookups", 2477 .data = &dqstats.lookups, 2478 .maxlen = sizeof(int), 2479 .mode = 0444, |
2481 .proc_handler = &proc_dointvec, | 2480 .proc_handler = proc_dointvec, |
2482 }, 2483 { | 2481 }, 2482 { |
2484 .ctl_name = FS_DQ_DROPS, | |
2485 .procname = "drops", 2486 .data = &dqstats.drops, 2487 .maxlen = sizeof(int), 2488 .mode = 0444, | 2483 .procname = "drops", 2484 .data = &dqstats.drops, 2485 .maxlen = sizeof(int), 2486 .mode = 0444, |
2489 .proc_handler = &proc_dointvec, | 2487 .proc_handler = proc_dointvec, |
2490 }, 2491 { | 2488 }, 2489 { |
2492 .ctl_name = FS_DQ_READS, | |
2493 .procname = "reads", 2494 .data = &dqstats.reads, 2495 .maxlen = sizeof(int), 2496 .mode = 0444, | 2490 .procname = "reads", 2491 .data = &dqstats.reads, 2492 .maxlen = sizeof(int), 2493 .mode = 0444, |
2497 .proc_handler = &proc_dointvec, | 2494 .proc_handler = proc_dointvec, |
2498 }, 2499 { | 2495 }, 2496 { |
2500 .ctl_name = FS_DQ_WRITES, | |
2501 .procname = "writes", 2502 .data = &dqstats.writes, 2503 .maxlen = sizeof(int), 2504 .mode = 0444, | 2497 .procname = "writes", 2498 .data = &dqstats.writes, 2499 .maxlen = sizeof(int), 2500 .mode = 0444, |
2505 .proc_handler = &proc_dointvec, | 2501 .proc_handler = proc_dointvec, |
2506 }, 2507 { | 2502 }, 2503 { |
2508 .ctl_name = FS_DQ_CACHE_HITS, | |
2509 .procname = "cache_hits", 2510 .data = &dqstats.cache_hits, 2511 .maxlen = sizeof(int), 2512 .mode = 0444, | 2504 .procname = "cache_hits", 2505 .data = &dqstats.cache_hits, 2506 .maxlen = sizeof(int), 2507 .mode = 0444, |
2513 .proc_handler = &proc_dointvec, | 2508 .proc_handler = proc_dointvec, |
2514 }, 2515 { | 2509 }, 2510 { |
2516 .ctl_name = FS_DQ_ALLOCATED, | |
2517 .procname = "allocated_dquots", 2518 .data = &dqstats.allocated_dquots, 2519 .maxlen = sizeof(int), 2520 .mode = 0444, | 2511 .procname = "allocated_dquots", 2512 .data = &dqstats.allocated_dquots, 2513 .maxlen = sizeof(int), 2514 .mode = 0444, |
2521 .proc_handler = &proc_dointvec, | 2515 .proc_handler = proc_dointvec, |
2522 }, 2523 { | 2516 }, 2517 { |
2524 .ctl_name = FS_DQ_FREE, | |
2525 .procname = "free_dquots", 2526 .data = &dqstats.free_dquots, 2527 .maxlen = sizeof(int), 2528 .mode = 0444, | 2518 .procname = "free_dquots", 2519 .data = &dqstats.free_dquots, 2520 .maxlen = sizeof(int), 2521 .mode = 0444, |
2529 .proc_handler = &proc_dointvec, | 2522 .proc_handler = proc_dointvec, |
2530 }, 2531 { | 2523 }, 2524 { |
2532 .ctl_name = FS_DQ_SYNCS, | |
2533 .procname = "syncs", 2534 .data = &dqstats.syncs, 2535 .maxlen = sizeof(int), 2536 .mode = 0444, | 2525 .procname = "syncs", 2526 .data = &dqstats.syncs, 2527 .maxlen = sizeof(int), 2528 .mode = 0444, |
2537 .proc_handler = &proc_dointvec, | 2529 .proc_handler = proc_dointvec, |
2538 }, 2539#ifdef CONFIG_PRINT_QUOTA_WARNING 2540 { | 2530 }, 2531#ifdef CONFIG_PRINT_QUOTA_WARNING 2532 { |
2541 .ctl_name = FS_DQ_WARNINGS, | |
2542 .procname = "warnings", 2543 .data = &flag_print_warnings, 2544 .maxlen = sizeof(int), 2545 .mode = 0644, | 2533 .procname = "warnings", 2534 .data = &flag_print_warnings, 2535 .maxlen = sizeof(int), 2536 .mode = 0644, |
2546 .proc_handler = &proc_dointvec, | 2537 .proc_handler = proc_dointvec, |
2547 }, 2548#endif | 2538 }, 2539#endif |
2549 { .ctl_name = 0 }, | 2540 { }, |
2550}; 2551 2552static ctl_table fs_table[] = { 2553 { | 2541}; 2542 2543static ctl_table fs_table[] = { 2544 { |
2554 .ctl_name = FS_DQSTATS, | |
2555 .procname = "quota", 2556 .mode = 0555, 2557 .child = fs_dqstats_table, 2558 }, | 2545 .procname = "quota", 2546 .mode = 0555, 2547 .child = fs_dqstats_table, 2548 }, |
2559 { .ctl_name = 0 }, | 2549 { }, |
2560}; 2561 2562static ctl_table sys_table[] = { 2563 { | 2550}; 2551 2552static ctl_table sys_table[] = { 2553 { |
2564 .ctl_name = CTL_FS, | |
2565 .procname = "fs", 2566 .mode = 0555, 2567 .child = fs_table, 2568 }, | 2554 .procname = "fs", 2555 .mode = 0555, 2556 .child = fs_table, 2557 }, |
2569 { .ctl_name = 0 }, | 2558 { }, |
2570}; 2571 2572static int __init dquot_init(void) 2573{ 2574 int i; 2575 unsigned long nr_hash, order; 2576 2577 printk(KERN_NOTICE "VFS: Disk quotas %s\n", __DQUOT_VERSION__); --- 41 unchanged lines hidden --- | 2559}; 2560 2561static int __init dquot_init(void) 2562{ 2563 int i; 2564 unsigned long nr_hash, order; 2565 2566 printk(KERN_NOTICE "VFS: Disk quotas %s\n", __DQUOT_VERSION__); --- 41 unchanged lines hidden --- |