search for: bit_off

Displaying 15 results from an estimated 15 matches for "bit_off".

2013 Nov 22
0
[PATCH Resend] ocfs2: free allocated clusters if error occurs after ocfs2_claim_clusters
...100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -4742,6 +4742,7 @@ int ocfs2_add_clusters_in_btree(handle_t *handle, enum ocfs2_alloc_restarted *reason_ret) { int status = 0, err = 0; + int need_free = 0; int free_extents; enum ocfs2_alloc_restarted reason = RESTART_NONE; u32 bit_off, num_bits; @@ -4796,7 +4797,8 @@ int ocfs2_add_clusters_in_btree(handle_t *handle, OCFS2_JOURNAL_ACCESS_WRITE); if (status < 0) { mlog_errno(status); - goto leave; + need_free = 1; + goto bail; } block = ocfs2_clusters_to_blocks(osb->sb, bit_off); @@ -4807,7 +4809,8...
2013 Nov 21
1
[PATCH] ocfs2: free allocated clusters if error occurs after ocfs2_claim_clusters
...100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -4742,6 +4742,7 @@ int ocfs2_add_clusters_in_btree(handle_t *handle, enum ocfs2_alloc_restarted *reason_ret) { int status = 0, err = 0; + int need_free = 0; int free_extents; enum ocfs2_alloc_restarted reason = RESTART_NONE; u32 bit_off, num_bits; @@ -4796,7 +4797,8 @@ int ocfs2_add_clusters_in_btree(handle_t *handle, OCFS2_JOURNAL_ACCESS_WRITE); if (status < 0) { mlog_errno(status); - goto leave; + need_free = 1; + goto bail; } block = ocfs2_clusters_to_blocks(osb->sb, bit_off); @@ -4807,7 +4809,8...
2006 Aug 15
0
[git patches] ocfs2 updates
...mount. */ diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 1955230..9d91e66 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c @@ -70,12 +70,6 @@ static int ocfs2_block_group_search(stru struct buffer_head *group_bh, u32 bits_wanted, u32 min_bits, u16 *bit_off, u16 *bits_found); -static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, - u32 bits_wanted, - u32 min_bits, - u16 *bit_off, - unsigned int *num_bits, - u64 *bg_blkno); static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, struct oc...
2013 Mar 15
0
[PATCH] Btrfs: add some free space cache tests
...btrfs_free_space *info; + int ret = 0; + + spin_lock(&ctl->tree_lock); + info = tree_search_offset(ctl, offset, 0, 0); + if (!info) { + info = tree_search_offset(ctl, offset_to_bitmap(ctl, offset), + 1, 0); + if (!info) + goto out; + } + +have_info: + if (info->bitmap) { + u64 bit_off, bit_bytes; + struct rb_node *n; + struct btrfs_free_space *tmp; + + bit_off = offset; + bit_bytes = ctl->unit; + ret = search_bitmap(ctl, info, &bit_off, &bit_bytes); + if (!ret) { + if (bit_off == offset) { + ret = 1; + goto out; + } else if (bit_off > offset &&a...
2013 Nov 05
1
ocfs2: why not set EROFS when clearing bits multiple times
...ill need to be alerted to its * occurrence. Hence, marking it as an ERROR and not NOTICE. */ if (num_bits != bits_cleared) { mlog(ML_ERROR, "Trying to clear %u bits at offset %u in group " "descriptor # %llu (device %s), needed to clear %u bits\n", num_bits, bit_off, (unsigned long long)le64_to_cpu(bg->bg_blkno), alloc_inode->i_sb->s_id, bits_cleared); } If this case happens, does it mean the filesystem have already been inconsistent? If so, why not set EROFS when this case happens? Or anyone knows which case will casue bits to be clea...
2008 Sep 04
4
[PATCH 0/3] ocfs2: Switch over to JBD2.
ocfs2 currently uses the Journaled Block Device (JBD) for its journaling. This is a very stable and tested codebase. However, JBD is limited by architecture to 32bit block numbers. This means an ocfs2 filesystem is limited to 2^32 blocks. With a 4K blocksize, that's 16TB. People want larger volumes. Fortunately, there is now JBD2. JBD2 adds 64bit block number support and some other
2013 Nov 25
0
[PATCH] ocfs2: correctly update i_used in ocfs2_free_local_alloc_bits
...cal_alloc_bits(struct ocfs2_super *osb, u32 num_bits) { int status, start; + u32 clear_bits; struct inode *local_alloc_inode; void *bitmap; struct ocfs2_dinode *alloc; @@ -801,6 +802,7 @@ int ocfs2_free_local_alloc_bits(struct ocfs2_super *osb, bitmap = la->la_bitmap; start = bit_off - le32_to_cpu(la->la_bm_off); + clear_bits = num_bits; status = ocfs2_journal_access_di(handle, INODE_CACHE(local_alloc_inode), @@ -811,7 +813,7 @@ int ocfs2_free_local_alloc_bits(struct ocfs2_super *osb, goto bail; } - while (num_bits--) + while (clear_bits--) ocfs2_clear_bit(...
2009 Jun 19
6
[PATCH 1/5] ocfs2: Pin journal head before accessing jh->b_committed_data
...group_desc *) bh2jh(group_bh)->b_committed_data; + cluster_bitmap = 1; + + if (cluster_bitmap) { + jbd_lock_bh_state(group_bh); + undo_bg = (struct ocfs2_group_desc *) + bh2jh(group_bh)->b_committed_data; + BUG_ON(!undo_bg); + } tmp = num_bits; while(tmp--) { ocfs2_clear_bit((bit_off + tmp), (unsigned long *) bg->bg_bitmap); - if (ocfs2_is_cluster_bitmap(alloc_inode)) + if (cluster_bitmap) ocfs2_set_bit(bit_off + tmp, (unsigned long *) undo_bg->bg_bitmap); } le16_add_cpu(&bg->bg_free_bits_count, num_bits); + if (cluster_bitmap) + jbd_un...
2009 Mar 18
2
[RFC] metadata alloc fix in machines which has PAGE_SIZE > CLUSTER_SIZE
Hi Mark/Joel, I meet with some meta allocation bugs when I implement reflink these days. And after some investigation, I think we should have the same problem when we have PAGE_SIZE > CLUSTER_SIZE. So I create a scenario today in one ppc box and try. the box panic as I expected. ;) The scenario is that: Create a file with the disk layout like this(with bs=512, and cs=4K). debugfs: stat
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 Feb 13
44
[PATCH 0/40] ocfs2: Detach ocfs2 metadata I/O from struct inode
The following series of patches attempts to detach metadata I/O from struct inode. They are currently tied together pretty tightly. Metadata reads happen via the ocfs2_read_blocks() functions, writes via both jbd2 and ocfs2_write_blocks(). - Each inode has a cache of associated metadata blocks stored on its ip_metadata_cache member. The ocfs2_read/write_blocks() functions take a struct
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
2009 Mar 27
42
[PATCH 00/42] ocfs2: Add reflink file support. V1
Hi all, So I have finally finished the v1 of reflink for ocfs2. It has some bugs that I am still investigating, but the schema is almost there. So I'd like to send it out first for review. And Tristan and I will continue to work on the stability of the code. The general information for reflink, please see http://oss.oracle.com/osswiki/OCFS2/DesignDocs/Reflink. For the design doc, please
2009 Apr 03
42
[PATCH 00/42] ocfs2: Add reflink file support. V2
Hi all, Change from v1 to v2: bug fix and metadata/credits reservation improvement. The general information for reflink, please see http://oss.oracle.com/osswiki/OCFS2/DesignDocs/Reflink. For the design doc, please see http://oss.oracle.com/osswiki/OCFS2/DesignDocs/RefcountTrees http://oss.oracle.com/osswiki/OCFS2/DesignDocs/ReflinkOperation
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