search for: s_blocksize_bits

Displaying 20 results from an estimated 28 matches for "s_blocksize_bits".

2004 Jun 06
1
[PATCH] use sb_getblk
...e alloc_bh->b_state |= (1UL << BH_New); brelse(alloc_bh); } Index: src/volcfg.c =================================================================== --- src/volcfg.c (revision 1014) +++ src/volcfg.c (working copy) @@ -496,7 +491,7 @@ } blocknum = lock_off >> sb->s_blocksize_bits; - bh = getblk(OCFS_GET_BLOCKDEV(sb), blocknum, sb->s_blocksize); + bh = sb_getblk(sb, blocknum); if (bh == NULL) { LOG_ERROR_STATUS (status = -EIO); goto finally; @@ -646,7 +641,7 @@ ((node_num + OCFS_VOLCFG_HDR_SECTORS) * osb->sect_size); blocknum = offset >> sb->s_blo...
2010 Jul 11
2
[PATCH 1/2] JBD2: Allow feature checks before journal recovery
Before we start accessing a huge (> 16 TiB) OCFS2 volume, we need to confirm that its journal supports 64-bit offsets. So we need to check the journal's feature bits before recovering the journal. This is not possible with JBD2 at present, because the journal superblock (where the feature bits reside) is not loaded from disk until the journal is recovered. This patch loads the journal
2010 Jul 22
4
[PATCH 1/3] ext3/ext4: Factor out disk addressability check
...xt3/super.c index 6c953bb..d0643db 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c @@ -1862,8 +1862,8 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) goto failed_mount; } - if (le32_to_cpu(es->s_blocks_count) > - (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) { + if (generic_check_addressable(sb->s_blocksize_bits, + le32_to_cpu(es->s_blocks_count))) { ext3_msg(sb, KERN_ERR, "error: filesystem is too large to mount safely"); if (sizeof(sector_t) < 8) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 4e8983a....
2004 Mar 29
1
information on block size in ext2
hi all I want to know wt does s_log_blocksize represent in ext2's superblock structure in memory.. Is is 1024 for 1kb block size in ext2 file system.. Also wt does s_blocksize and s_blocksize_bits members of VFS superblock represent.. BTW are there any ext2 file system specific mailing lists.. bye a Linux lover
2004 Aug 02
6
Calculating volume size from superblock
Another simple question. How do I calculate the size of the volume from the superblock? Do I just use the two fields: u_int32_t s_blocksize_bits; /* Blocksize for this fs */ u_int32_t s_clustersize_bits; /* Clustersize for this fs */ What is the formula to use? Thanks, John
2009 Aug 03
1
[PATCH] ocfs2: Handle quota file corruption more gracefully
...include "super.h" #include "quota.h" static struct workqueue_struct *ocfs2_quota_wq = NULL; @@ -114,6 +115,14 @@ int ocfs2_read_quota_block(struct inode *inode, u64 v_block, int rc = 0; struct buffer_head *tmp = *bh; + if (i_size_read(inode) >> inode->i_sb->s_blocksize_bits <= v_block) { + ocfs2_error(inode->i_sb, + "Quota file %lu is probably corrupted! Requested " + "to read block %Lu but file has size only %Lu\n", + inode->i_ino, (unsigned long long)v_block, + (unsigned long long)i_size_read(inode)); + return -...
2012 Dec 18
0
[PATCH] [RFC] Btrfs: Subpagesize blocksize (WIP).
...gfp_t mask) +{ + u32 blocksize_bits; + struct btrfs_inode *inode; + struct extent_buffer *eb_head; + struct extent_buffer *eb_cur; + u64 start; + unsigned long len; + int i; + + /* Initialize variables. */ + inode = BTRFS_I(tree->mapping->host); + blocksize_bits = inode->vfs_inode.i_sb->s_blocksize_bits; + + /* Calculate extent buffer dimensions. */ + start = page->index << PAGE_CACHE_SHIFT; + len = inode->root->leafsize; + + /* Allocate the head extent buffer. */ + eb_head = __alloc_extent_buffer(tree, start, len, GFP_NOFS); + if (!eb_head) { + WARN_ON(1); + return NULL; + } + st...
2003 Feb 04
0
[PATCH] Fix signed use of i_blocks in ext3 truncate
...-87,6 +87,34 @@ return err; } +/* + * Work out how many blocks we need to progress with the next chunk of a + * truncate transaction. + */ + +static unsigned long blocks_for_truncate(struct inode *inode) +{ + unsigned long needed; + + needed = inode->i_blocks >> (inode->i_sb->s_blocksize_bits - 9); + + /* Give ourselves just enough room to cope with inodes in which + * i_blocks is corrupt: we've seen disk corruptions in the past + * which resulted in random data in an inode which looked enough + * like a regular file for ext3 to try to delete it. Things + * will go a bit crazy...
2006 Dec 29
3
[git patches] ocfs2 fixes
...-540,8 +540,7 @@ static int ocfs2_direct_IO_get_blocks(st struct buffer_head *bh_result, int create) { int ret; - u64 vbo_max; /* file offset, max_blocks from iblock */ - u64 p_blkno; + u64 p_blkno, inode_blocks; int contig_blocks; unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits; unsigned long max_blocks = bh_result->b_size >> inode->i_blkbits; @@ -550,12 +549,23 @@ static int ocfs2_direct_IO_get_blocks(st * nicely aligned and of the right size, so there's no need * for us to check any of that. */ - vbo_max = ((u64)iblock + max_blocks) << bl...
2007 Sep 19
1
[PATCH 06/15] ocfs2: Remove open coded readdir()
...an_dir_inode = ocfs2_get_system_file_inode(osb, ORPHAN_DIR_SYSTEM_INODE, @@ -1241,77 +1273,15 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb, goto out; } - offset = 0; - iter = NULL; - while(offset < i_size_read(orphan_dir_inode)) { - blk = offset >> sb->s_blocksize_bits; - - bh = ocfs2_bread(orphan_dir_inode, blk, &status, 0); - if (!bh) - status = -EINVAL; - if (status < 0) { - if (bh) - brelse(bh); - mlog_errno(status); - goto out_unlock; - } - - local = 0; - while(offset < i_size_read(orphan_dir_inode) - && local < s...
2007 Aug 21
1
[git patch] dmesg + fstype ocfs2
...pat; /* Incompatible feature set */ + uint32_t s_feature_ro_compat; /* Readonly-compatible feature set */ + uint64_t s_root_blkno; /* Offset, in blocks, of root directory + dinode */ +/*30*/ uint64_t s_system_dir_blkno; /* Offset, in blocks, of system + directory dinode */ + uint32_t s_blocksize_bits; /* Blocksize for this fs */ + uint32_t s_clustersize_bits; /* Clustersize for this fs */ +/*40*/ uint16_t s_max_slots; /* Max number of simultaneous mounts + before tunefs required */ + uint16_t s_reserved1; + uint32_t s_reserved2; + uint64_t s_first_cluster_group; /* Block offset of 1st...
2008 Oct 17
3
[PATCH 0/3] ocfs2: add security EA and ACL support v3
Hi, These three patches fix the problems in the version two. And them base on the Tao's patches: ocfs2/xattr: xattr improvement The first patch fix some problem in xattr code. The second patch add security EA support. The third patch add ACL support. Best regards, tiger
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...data_used = sinfo->bytes_used; + spin_unlock(&sinfo->lock); + + sinfo = __find_space_info(fs_info, BTRFS_BLOCK_GROUP_METADATA); + spin_lock(&sinfo->lock); + meta_used = sinfo->bytes_used; + spin_unlock(&sinfo->lock); + + num_bytes = (data_used >> fs_info->sb->s_blocksize_bits) * + csum_size * 2; + num_bytes += div64_u64(data_used + meta_used, 50); + + if (num_bytes * 3 > meta_used) + num_bytes = div64_u64(meta_used, 3); + + return ALIGN(num_bytes, fs_info->extent_root->leafsize << 10); +} + +static void update_global_block_rsv(struct btrfs_fs_info *...
2009 Jan 30
8
[PATCH 0/7] ocfs2: Directory indexing support
The following patches implement indexed directory support in Ocfs2, mostly according to the design doc I wrote up a while ago: http://oss.oracle.com/osswiki/OCFS2/DesignDocs/IndexedDirectories The patches have been rebased on top of 2.6.29-rc2. It should be trivial to put them into merge_window. Things are what I'd call complete now. I'd like to get these into the merge_window branch
2009 Jul 13
1
[PATCH 1/1] adds mlogs to aops.c
...unsigned long long)block); /* We don't need to lock journal system files, since they aren't * accessed concurrently from multiple nodes. @@ -555,6 +586,9 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock, unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits; unsigned long max_blocks = bh_result->b_size >> inode->i_blkbits; + mlog_entry("(%llu, %llu, 0x%p, %d)\n", OCFS2_I(inode)->ip_blkno, + (unsigned long long)iblock, bh_result, create); + /* This function won't even be called if the request isn't all * ni...
2009 Jul 21
1
(no subject)
...nsigned long long)block); /* We don't need to lock journal system files, since they aren't * accessed concurrently from multiple nodes. @@ -555,6 +589,10 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock, unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits; unsigned long max_blocks = bh_result->b_size >> inode->i_blkbits; + mlog_entry("(%llu, %llu, 0x%p, %d)\n", + (unsigned long long)OCFS2_I(inode)->ip_blkno, + (unsigned long long)iblock, bh_result, create); + /* This function won't even be called if the req...
2008 Dec 22
56
[git patches] Ocfs2 patches for merge window, batch 2/3
Hi, This is the second batch of Ocfs2 patches intended for the merge window. The 1st batch were sent out previously: http://lkml.org/lkml/2008/12/19/280 The bulk of this set is comprised of Jan Kara's patches to add quota support to Ocfs2. Many of the quota patches are to generic code, which I carried to make merging of the Ocfs2 support easier. All of the non-ocfs2 patches should have
2008 Oct 28
14
[PATCH 0/13] ocfs2: xattr bucket API
When the extended attribute namespace grows to a b-tree, the leaf clusters are organized by means of 'buckets'. Each bucket is 4K in size, regardless of blocksize. Thus, a bucket may be made of more than one block. fs/ocfs2/xattr.c has a nice little abstraction to wrap this, struct ocfs2_xattr_bucket. It contains a list of buffer_heads representing these blocks, and there is even an
2009 Jul 21
1
[PATCH 1/1] ocfs2: adds mlogs to aops.c -V2
...nsigned long long)block); /* We don't need to lock journal system files, since they aren't * accessed concurrently from multiple nodes. @@ -555,6 +589,10 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock, unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits; unsigned long max_blocks = bh_result->b_size >> inode->i_blkbits; + mlog_entry("(%llu, %llu, 0x%p, %d)\n", + (unsigned long long)OCFS2_I(inode)->ip_blkno, + (unsigned long long)iblock, bh_result, create); + /* This function won't even be called if the req...
2009 Mar 17
33
[git patches] Ocfs2 updates for 2.6.30
Hi, The following patches comprise the bulk of Ocfs2 updates for the 2.6.30 merge window. Aside from larger, more involved fixes, we're adding the following features, which I will describe in the order their patches are mailed. Sunil's exported some more state to our debugfs files, and consolidated some other aspects of our debugfs infrastructure. This will further aid us in debugging