mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
![Linus Torvalds](/assets/img/avatar_default.png)
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (57 commits) jbd2: Fix oops in jbd2_journal_init_inode() on corrupted fs ext4: Remove "extents" mount option block: Add Kconfig help which notes that ext4 needs CONFIG_LBD ext4: Make printk's consistently prefixed with "EXT4-fs: " ext4: Add sanity checks for the superblock before mounting the filesystem ext4: Add mount option to set kjournald's I/O priority jbd2: Submit writes to the journal using WRITE_SYNC jbd2: Add pid and journal device name to the "kjournald2 starting" message ext4: Add markers for better debuggability ext4: Remove code to create the journal inode ext4: provide function to release metadata pages under memory pressure ext3: provide function to release metadata pages under memory pressure add releasepage hooks to block devices which can be used by file systems ext4: Fix s_dirty_blocks_counter if block allocation failed with nodelalloc ext4: Init the complete page while building buddy cache ext4: Don't allow new groups to be added during block allocation ext4: mark the blocks/inode bitmap beyond end of group as used ext4: Use new buffer_head flag to check uninit group bitmaps initialization ext4: Fix the race between read_inode_bitmap() and ext4_new_inode() ext4: code cleanup ...
93 lines
3 KiB
C
93 lines
3 KiB
C
/*
|
|
* linux/include/linux/ext3_fs_sb.h
|
|
*
|
|
* Copyright (C) 1992, 1993, 1994, 1995
|
|
* Remy Card (card@masi.ibp.fr)
|
|
* Laboratoire MASI - Institut Blaise Pascal
|
|
* Universite Pierre et Marie Curie (Paris VI)
|
|
*
|
|
* from
|
|
*
|
|
* linux/include/linux/minix_fs_sb.h
|
|
*
|
|
* Copyright (C) 1991, 1992 Linus Torvalds
|
|
*/
|
|
|
|
#ifndef _LINUX_EXT3_FS_SB
|
|
#define _LINUX_EXT3_FS_SB
|
|
|
|
#ifdef __KERNEL__
|
|
#include <linux/timer.h>
|
|
#include <linux/wait.h>
|
|
#include <linux/blockgroup_lock.h>
|
|
#include <linux/percpu_counter.h>
|
|
#endif
|
|
#include <linux/rbtree.h>
|
|
|
|
/*
|
|
* third extended-fs super-block data in memory
|
|
*/
|
|
struct ext3_sb_info {
|
|
unsigned long s_frag_size; /* Size of a fragment in bytes */
|
|
unsigned long s_frags_per_block;/* Number of fragments per block */
|
|
unsigned long s_inodes_per_block;/* Number of inodes per block */
|
|
unsigned long s_frags_per_group;/* Number of fragments in a group */
|
|
unsigned long s_blocks_per_group;/* Number of blocks in a group */
|
|
unsigned long s_inodes_per_group;/* Number of inodes in a group */
|
|
unsigned long s_itb_per_group; /* Number of inode table blocks per group */
|
|
unsigned long s_gdb_count; /* Number of group descriptor blocks */
|
|
unsigned long s_desc_per_block; /* Number of group descriptors per block */
|
|
unsigned long s_groups_count; /* Number of groups in the fs */
|
|
unsigned long s_overhead_last; /* Last calculated overhead */
|
|
unsigned long s_blocks_last; /* Last seen block count */
|
|
struct buffer_head * s_sbh; /* Buffer containing the super block */
|
|
struct ext3_super_block * s_es; /* Pointer to the super block in the buffer */
|
|
struct buffer_head ** s_group_desc;
|
|
unsigned long s_mount_opt;
|
|
ext3_fsblk_t s_sb_block;
|
|
uid_t s_resuid;
|
|
gid_t s_resgid;
|
|
unsigned short s_mount_state;
|
|
unsigned short s_pad;
|
|
int s_addr_per_block_bits;
|
|
int s_desc_per_block_bits;
|
|
int s_inode_size;
|
|
int s_first_ino;
|
|
spinlock_t s_next_gen_lock;
|
|
u32 s_next_generation;
|
|
u32 s_hash_seed[4];
|
|
int s_def_hash_version;
|
|
int s_hash_unsigned; /* 3 if hash should be signed, 0 if not */
|
|
struct percpu_counter s_freeblocks_counter;
|
|
struct percpu_counter s_freeinodes_counter;
|
|
struct percpu_counter s_dirs_counter;
|
|
struct blockgroup_lock *s_blockgroup_lock;
|
|
|
|
/* root of the per fs reservation window tree */
|
|
spinlock_t s_rsv_window_lock;
|
|
struct rb_root s_rsv_window_root;
|
|
struct ext3_reserve_window_node s_rsv_window_head;
|
|
|
|
/* Journaling */
|
|
struct inode * s_journal_inode;
|
|
struct journal_s * s_journal;
|
|
struct list_head s_orphan;
|
|
unsigned long s_commit_interval;
|
|
struct block_device *journal_bdev;
|
|
#ifdef CONFIG_JBD_DEBUG
|
|
struct timer_list turn_ro_timer; /* For turning read-only (crash simulation) */
|
|
wait_queue_head_t ro_wait_queue; /* For people waiting for the fs to go read-only */
|
|
#endif
|
|
#ifdef CONFIG_QUOTA
|
|
char *s_qf_names[MAXQUOTAS]; /* Names of quota files with journalled quota */
|
|
int s_jquota_fmt; /* Format of quota to use */
|
|
#endif
|
|
};
|
|
|
|
static inline spinlock_t *
|
|
sb_bgl_lock(struct ext3_sb_info *sbi, unsigned int block_group)
|
|
{
|
|
return bgl_lock_ptr(sbi->s_blockgroup_lock, block_group);
|
|
}
|
|
|
|
#endif /* _LINUX_EXT3_FS_SB */
|