Displaying 20 results from an estimated 36 matches for "block_start".
2013 Oct 16
0
[PATCH] Btrfs: add tests for btrfs_get_extent V2
...r_level(root->node, 0);
+ ret = -EINVAL;
+
+ /* First with no extents */
+ BTRFS_I(inode)->root = root;
+ em = btrfs_get_extent(inode, NULL, 0, 0, 4096, 0);
+ if (IS_ERR(em)) {
+ em = NULL;
+ test_msg("Got an error when we shouldn''t have\n");
+ goto out;
+ }
+ if (em->block_start != EXTENT_MAP_HOLE) {
+ test_msg("Expected a hole, got %Lu\n", em->block_start);
+ goto out;
+ }
+ if (!test_bit(EXTENT_FLAG_VACANCY, &em->flags)) {
+ test_msg("Vacancy flag wasn''t set properly\n");
+ goto out;
+ }
+ free_extent_map(em);
+ btrfs_drop_exten...
2023 Jun 19
9
[PATCH v2 0/5] clean up block_commit_write
Changelog:
v1--v2:
1. Re-order patches to avoid breaking compilation.
Bean Huo (5):
fs/buffer: clean up block_commit_write
ext4: No need to check return value of block_commit_write()
fs/ocfs2: No need to check return value of block_commit_write()
udf: No need to check return value of block_commit_write()
fs/buffer.c: convert block_commit_write to return void
fs/buffer.c
2009 Jun 10
2
[LLVMdev] Problem with llc and ppc64
...-linux:
.../crosstools/gcc-4.2.4-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin/powerpc64-unknown-linux-gnu-gcc gzip.s
But the compiler gives me
gzip.4.s: Assembler messages:
gzip.4.s:2007: Error: value of 326712 too large for field of 2 bytes at 6994
...
The line 2007 looks like:
...
ld 6, block_start at l(6)
...
Where the symbol block_start is defined at the end of gzip.s as
...
.section .bss,"aw", at nobits
...
.lcomm block_start,8 # 'block_start'
...
Is there something wrong with my cross-compiler or is the llc-generated code bad?...
2023 Jun 19
0
[PATCH v1 4/5] fs/ocfs2: No need to check return value of block_commit_write()
...fs/ocfs2/file.c
> index efb09de4343d..39d8dbb26bb3 100644
> --- a/fs/ocfs2/file.c
> +++ b/fs/ocfs2/file.c
> @@ -808,12 +808,7 @@ static int ocfs2_write_zero_page(struct inode *inode, u64 abs_from,
>
>
> /* must not update i_size! */
> - ret = block_commit_write(page, block_start + 1,
> - block_start + 1);
> - if (ret < 0)
> - mlog_errno(ret);
> - else
> - ret = 0;
> + block_commit_write(page, block_start + 1, block_start + 1);
> }
>
> /*
> --
> 2.34.1
>
--
Jan Kara <jack at suse.com>
SUSE Labs, CR
2023 Jul 02
0
+ fs-convert-block_commit_write-to-return-void.patch added to mm-unstable branch
...rn-void
+++ a/fs/buffer.c
@@ -2180,7 +2180,7 @@ int __block_write_begin(struct page *pag
}
EXPORT_SYMBOL(__block_write_begin);
-static int __block_commit_write(struct folio *folio, size_t from, size_t to)
+static void __block_commit_write(struct folio *folio, size_t from, size_t to)
{
size_t block_start, block_end;
bool partial = false;
@@ -2215,7 +2215,6 @@ static int __block_commit_write(struct f
*/
if (!partial)
folio_mark_uptodate(folio);
- return 0;
}
/*
@@ -2597,11 +2596,10 @@ int cont_write_begin(struct file *file,
}
EXPORT_SYMBOL(cont_write_begin);
-int block_commit_write...
2013 Oct 14
0
[PATCH] Btrfs: fix hole check in log_one_extent
I added an assert to make sure we were looking up aligned offsets for csums and
I tripped it when running xfstests. This is because log_one_extent was checking
if block_start == 0 for a hole instead of EXTENT_MAP_HOLE. This worked out fine
in practice it seems, but it adds a lot of extra work that is uneeded. With
this fix I''m no longer tripping my assert. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
---
fs/btrfs/tree-log.c | 2 +-
1 file...
2023 Jun 18
11
[PATCH v1 0/5] clean up block_commit_write
*** BLURB HERE ***
Bean Huo (5):
fs/buffer: clean up block_commit_write
fs/buffer.c: convert block_commit_write to return void
ext4: No need to check return value of block_commit_write()
fs/ocfs2: No need to check return value of block_commit_write()
udf: No need to check return value of block_commit_write()
fs/buffer.c | 24 +++++++-----------------
2009 Jul 13
1
[PATCH 1/1] adds mlogs to aops.c
...pare_write(page, from, to, ocfs2_get_block);
+ mlog_exit(ret);
return ret;
}
@@ -439,6 +461,8 @@ int walk_page_buffers( handle_t *handle,
int err, ret = 0;
struct buffer_head *next;
+ mlog_entry("(0x%p, 0x%p, %u, %u, 0x%p)\n", handle, head, from, to, fn);
+
for ( bh = head, block_start = 0;
ret == 0 && (bh != head || !block_start);
block_start = block_end, bh = next)
@@ -454,18 +478,23 @@ int walk_page_buffers( handle_t *handle,
if (!ret)
ret = err;
}
+
+ mlog_exit(ret);
return ret;
}
handle_t *ocfs2_start_walk_page_trans(struct inode *inode,
-...
2009 Jul 21
1
(no subject)
...pare_write(page, from, to, ocfs2_get_block);
+ mlog_exit(ret);
return ret;
}
@@ -439,6 +464,8 @@ int walk_page_buffers( handle_t *handle,
int err, ret = 0;
struct buffer_head *next;
+ mlog_entry("(0x%p, 0x%p, %u, %u, 0x%p)\n", handle, head, from, to, fn);
+
for ( bh = head, block_start = 0;
ret == 0 && (bh != head || !block_start);
block_start = block_end, bh = next)
@@ -454,18 +481,23 @@ int walk_page_buffers( handle_t *handle,
if (!ret)
ret = err;
}
+
+ mlog_exit(ret);
return ret;
}
handle_t *ocfs2_start_walk_page_trans(struct inode *inode,
-...
2010 Apr 26
0
[PATCH V2 11/12] Btrfs: Pre-allocate space for data relocation
...te_i_size(inode, i_size, NULL);
+ i_size_write(inode, cur_offset);
+ i_size_write(inode, cur_offset);
+ btrfs_ordered_update_i_size(inode, cur_offset, NULL);
}
ret = btrfs_update_inode(trans, root, inode);
@@ -6215,16 +6219,16 @@ static long btrfs_fallocate(struct inode
if (em->block_start == EXTENT_MAP_HOLE ||
(cur_offset >= inode->i_size &&
!test_bit(EXTENT_FLAG_PREALLOC, &em->flags))) {
- ret = prealloc_file_range(inode,
- cur_offset, last_byte,
- alloc_hint, mode, offset+len);
+ ret = btrfs_prealloc_file_range(inode, 0, cur_offs...
2012 Oct 01
1
[RFC] [PATCH] Btrfs: rework can_nocow_odirect
...ype(leaf, fi);
- if (found_type != BTRFS_FILE_EXTENT_REG &&
- found_type != BTRFS_FILE_EXTENT_PREALLOC) {
- /* not a regular extent, must cow */
- goto out;
- }
- disk_bytenr = btrfs_file_extent_disk_bytenr(leaf, fi);
- backref_offset = btrfs_file_extent_offset(leaf, fi);
+ if (em->block_start == EXTENT_MAP_INLINE ||
+ em->block_start == EXTENT_MAP_HOLE)
+ return 0;
- extent_end = key.offset + btrfs_file_extent_num_bytes(leaf, fi);
- if (extent_end < offset + len) {
- /* extent doesn''t include our full range, must cow */
- goto out;
- }
+ /*
+ * The em''s...
2010 May 07
6
[PATCH 1/5] fs: allow short direct-io reads to be completed via buffered IO V2
V1->V2: Check to see if our current ppos is >= i_size after a short DIO read,
just in case it was actually a short read and we need to just return.
This is similar to what already happens in the write case. If we have a short
read while doing O_DIRECT, instead of just returning, fallthrough and try to
read the rest via buffered IO. BTRFS needs this because if we encounter a
compressed or
2009 Jul 21
1
[PATCH 1/1] ocfs2: adds mlogs to aops.c -V2
...pare_write(page, from, to, ocfs2_get_block);
+ mlog_exit(ret);
return ret;
}
@@ -439,6 +464,8 @@ int walk_page_buffers( handle_t *handle,
int err, ret = 0;
struct buffer_head *next;
+ mlog_entry("(0x%p, 0x%p, %u, %u, 0x%p)\n", handle, head, from, to, fn);
+
for ( bh = head, block_start = 0;
ret == 0 && (bh != head || !block_start);
block_start = block_end, bh = next)
@@ -454,18 +481,23 @@ int walk_page_buffers( handle_t *handle,
if (!ret)
ret = err;
}
+
+ mlog_exit(ret);
return ret;
}
handle_t *ocfs2_start_walk_page_trans(struct inode *inode,
-...
2010 Jun 10
0
[PATCH] [12/23] BTRFS: Clean up unused variables -- bugs
...======
--- linux-2.6.35-rc2-gcc.orig/fs/btrfs/extent_io.c
+++ linux-2.6.35-rc2-gcc/fs/btrfs/extent_io.c
@@ -2825,6 +2825,8 @@ int extent_prepare_write(struct extent_i
NULL, 1,
end_bio_extent_preparewrite, 0,
0, 0);
+ if (ret && !err)
+ err = ret;
iocount++;
block_start = block_start + iosize;
} else {
Index: linux-2.6.35-rc2-gcc/fs/btrfs/inode.c
===================================================================
--- linux-2.6.35-rc2-gcc.orig/fs/btrfs/inode.c
+++ linux-2.6.35-rc2-gcc/fs/btrfs/inode.c
@@ -1372,7 +1372,7 @@ int btrfs_merge_bio_hook(struct page *p...
2009 Nov 02
0
[PATCH 7/8] Make fallocate(2) more ENOSPC friendly
...#39;'t wait on the range with the transaction
* running or with the extent lock held
@@ -5713,9 +5765,12 @@ static long btrfs_fallocate(struct inode
BUG_ON(IS_ERR(em) || !em);
last_byte = min(extent_map_end(em), alloc_end);
last_byte = (last_byte + mask) & ~mask;
- if (em->block_start == EXTENT_MAP_HOLE) {
- ret = prealloc_file_range(trans, inode, cur_offset,
- last_byte, alloc_hint, mode);
+ if (em->block_start == EXTENT_MAP_HOLE ||
+ (cur_offset >= inode->i_size &&
+ !test_bit(EXTENT_FLAG_PREALLOC, &em->flags))) {
+ ret = prealloc_f...
2007 Sep 13
0
5 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_scope.c libswfdec/swfdec_as_scope.h libswfdec/swfdec_as_script_function.c
...cript->buffer->length;
pc = frame->pc;
- check_scope = TRUE;
+ check_block = TRUE;
while (context->state < SWFDEC_AS_CONTEXT_ABORTED) {
- if (pc == endpc) {
- swfdec_as_frame_return (frame, NULL);
- goto start;
+ if (check_block && (pc < frame->block_start || pc >= frame->block_end)) {
+ SWFDEC_LOG ("code exited block");
+ swfdec_as_frame_check_block (frame);
+ pc = frame->pc;
+ if (frame != context->frame)
+ goto start;
}
if (pc < startpc || pc >= endpc) {
SWFDEC_ERROR ("pc %p not...
2012 Sep 12
2
Deadlock in btrfs-cleaner, related to snapshot deletion
...317.815742
[ 386.320040] .se->vruntime : 23467.274189
[ 386.320044] .se->sum_exec_runtime : 13.339940
[ 386.320047] .se->statistics.wait_start : 0.000000
[ 386.320051] .se->statistics.sleep_start : 0.000000
[ 386.320054] .se->statistics.block_start : 0.000000
[ 386.320057] .se->statistics.sleep_max : 0.000000
[ 386.320060] .se->statistics.block_max : 0.000000
[ 386.320063] .se->statistics.exec_max : 1.952409
[ 386.320067] .se->statistics.slice_max : 0.000000
[ 386.320070] .se->statistics.w...
2010 Mar 22
0
[PATCH] Btrfs: change direct I/O read to not use i_mutex.
...red data with btree not updated */
if (test_bit(EXTENT_FLAG_VACANCY, &em->flags)) {
printk(KERN_ERR
@@ -520,25 +582,12 @@ getlock:
} else {
len = min(len, em->len - (diocb->start - em->start));
if (test_bit(EXTENT_FLAG_PREALLOC, &em->flags) ||
- em->block_start == EXTENT_MAP_HOLE) {
+ em->block_start == EXTENT_MAP_HOLE)
err = btrfs_dio_hole_read(diocb, len);
- } else if (test_bit(EXTENT_FLAG_COMPRESSED,
- &em->flags)) {
- if (diocb->lockstart > em->start ||
- lockend < em->start + em->len - 1) {
-...
2007 Oct 28
0
9 commits - configure.ac libswfdec/swfdec_as_context.c libswfdec/swfdec_audio_internal.h libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_sound.c
...-git a/libswfdec/swfdec_as_context.c b/libswfdec/swfdec_as_context.c
index 54a1ac8..ca1af3d 100644
--- a/libswfdec/swfdec_as_context.c
+++ b/libswfdec/swfdec_as_context.c
@@ -863,13 +863,6 @@ start:
pc = frame->pc;
continue;
}
- if (check_block && (pc < frame->block_start || pc >= frame->block_end)) {
- SWFDEC_LOG ("code exited block");
- swfdec_as_frame_pop_block (frame);
- pc = frame->pc;
- if (frame != context->frame)
- goto start;
- }
if (pc == exitpc) {
swfdec_as_frame_return (frame, NULL);
goto st...
2023 Jun 19
0
[PATCH v1 1/5] fs/buffer: clean up block_commit_write
...t pos, unsigned len,
> }
> EXPORT_SYMBOL(__block_write_begin);
>
> -static int __block_commit_write(struct inode *inode, struct page *page,
> - unsigned from, unsigned to)
> +int block_commit_write(struct page *page, unsigned int from, unsigned int to)
> {
> unsigned block_start, block_end;
> int partial = 0;
> @@ -2154,6 +2153,7 @@ static int __block_commit_write(struct inode *inode, struct page *page,
> SetPageUptodate(page);
> return 0;
> }
> +EXPORT_SYMBOL(block_commit_write);
>
> /*
> * block_write_begin takes care of the basic...