search for: get_block

Displaying 20 results from an estimated 23 matches for "get_block".

2010 May 12
0
[PATCH 2/4] direct-io: add a hook for the fs to provide its own submit_bio function V3
...n -ENOTBLK for reads. Usually this has only worked for writes, since writes can fallback onto buffered IO. But BTRFS needs the option of falling back on buffered IO if it encounters a compressed extent, since we need to read the entire extent in and decompress it. So if we get -ENOTBLK back from get_block we''ll return back and fallback on buffered just like the write case. I''ve tested these changes with fsx and everything seems to work. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> --- fs/direct-io.c | 33 ++++++++++++++++++++++++++++----- include/linux/fs.h...
2011 Jun 10
2
Memory leak using libflac++
...s like the following: 12 bytes in 1 blocks are definitely lost in loss record 1 of 5 at 0x402377E: operator new(unsigned) (vg_replace_malloc.c:224) by 0x41448A8: FLAC::Metadata::local::construct_block(FLAC__StreamMetadata*) (in /usr/lib/libFLAC++.so.6.2.0) by 0x41455D7: FLAC::Metadata::Iterator::get_block() (in /usr/lib/libFLAC++.so.6.2.0) by 0x8072CB5: CFlacInfo::Read() (FlacInfo.cc:154) by 0x8054BF4: CFlacTag::LoadData() (flactag.cc:543) by 0x8058D45: CFlacTag::CFlacTag(CCommandLine const&) (flactag.cc:134) by 0x805D4E2: main (flactag.cc:66) In my code, the offending line is: m_PictureBlock=...
2011 Jun 11
0
Flac-dev Digest, Vol 79, Issue 3
...t; 12 bytes in 1 blocks are definitely lost in loss record 1 of 5 > at 0x402377E: operator new(unsigned) (vg_replace_malloc.c:224) > by 0x41448A8: FLAC::Metadata::local::construct_block(FLAC__StreamMetadata*) > (in /usr/lib/libFLAC++.so.6.2.0) by 0x41455D7: > FLAC::Metadata::Iterator::get_block() (in /usr/lib/libFLAC++.so.6.2.0) > by 0x8072CB5: CFlacInfo::Read() (FlacInfo.cc:154) > by 0x8054BF4: CFlacTag::LoadData() (flactag.cc:543) > by 0x8058D45: CFlacTag::CFlacTag(CCommandLine const&) (flactag.cc:134) > by 0x805D4E2: main (flactag.cc:66) > > In my code, the offend...
2011 Jun 11
0
Memory leak using libflac++
...t; 12 bytes in 1 blocks are definitely lost in loss record 1 of 5 > at 0x402377E: operator new(unsigned) (vg_replace_malloc.c:224) > by 0x41448A8: FLAC::Metadata::local::construct_block(FLAC__StreamMetadata*) > (in /usr/lib/libFLAC++.so.6.2.0) ? by 0x41455D7: > FLAC::Metadata::Iterator::get_block() (in /usr/lib/libFLAC++.so.6.2.0) > by 0x8072CB5: CFlacInfo::Read() (FlacInfo.cc:154) > by 0x8054BF4: CFlacTag::LoadData() (flactag.cc:543) > by 0x8058D45: CFlacTag::CFlacTag(CCommandLine const&) (flactag.cc:134) > by 0x805D4E2: main (flactag.cc:66) > > In my code, the offend...
2013 Jul 09
0
Slight memory leak or bad documentation
Hi, I was just messing around with a metadata modifier in flac (using the C++ api) and found something strange. When iterating over a chain and calling FLAC::Metadata::Iterator::get_block(), it seems a newly constructed ProtoType* is returned (the source says "return local::construct(::FLAC__metadata_simple_iterator_get_block(iterator_));"), if one does not delete this pointer, the program leaks memory (see attached example, run it through valgrind). However the documenta...
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
2023 Jun 19
1
[PATCH v1 2/5] fs/buffer.c: convert block_commit_write to return void
...if (!partial) > SetPageUptodate(page); > - return 0; > } > EXPORT_SYMBOL(block_commit_write); > > @@ -2577,11 +2576,11 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, > end = PAGE_SIZE; > > ret = __block_write_begin(page, 0, end, get_block); > - if (!ret) > - ret = block_commit_write(page, 0, end); > - > - if (unlikely(ret < 0)) > + if (unlikely(ret)) > goto out_unlock; > + > + block_commit_write(page, 0, end); > + > set_page_dirty(page); > wait_for_stable_page(page); > return 0; >...
2023 Jul 02
0
+ fs-convert-block_commit_write-to-return-void.patch added to mm-unstable branch
...unsigned to) { struct folio *folio = page_folio(page); __block_commit_write(folio, from, to); - return 0; } EXPORT_SYMBOL(block_commit_write); @@ -2647,11 +2645,11 @@ int block_page_mkwrite(struct vm_area_st end = size - folio_pos(folio); ret = __block_write_begin_int(folio, 0, end, get_block, NULL); - if (!ret) - ret = __block_commit_write(folio, 0, end); + if (unlikely(ret)) + goto out_unlock; + + __block_commit_write(folio, 0, end); - if (unlikely(ret < 0)) - goto out_unlock; folio_mark_dirty(folio); folio_wait_stable(folio); return 0; --- a/fs/ext4/move_extent.c~fs-co...
2014 Aug 20
6
Full MVCC in Brass
...ee list entry of the form {pack_uint4(-2) pack_uint4(revision)} that indicates all block numbers up to the next revision marker were freed in 'revision'. 2) Track the free revision of the entry at the head of the free list in BrassFreeList and serialize this to the RootInfo metadata. When get_block encounters a revision entry, it updates the head revision and moves on to the next free list entry. 3) In mark_block_unused, if this is the first block added since the free list was loaded or committed, then before adding the block number, add a revision entry with the uncommitted revision number....
2011 Jun 24
10
[PATCH 0/9] remove i_alloc_sem V2
i_alloc_sem has always been a bit of an odd "lock". It''s the only remaining rw_semaphore that can be released by a different thread than the one that locked it, and it''s use case in the core direct I/O code is more like a counter given that the writers already have external serialization. This series removes it in favour of a simpler counter scheme, thus getting rid
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 Jul 15
7
[PATCH 0/6] Quota fixes for 2.6.31-rc4
Hi, I did some more in-depth testing of OCFS2 quota code, especially with ECC feature enabled and spotted some problems. First four patches fix them. I need the fifth patch to be able to mount OCFS2 filesystem with 2.6.31-rc3. The sixth patch fixes a potential problem when quota syncing interval is updated while the cluster is running (which is not possible currently). Joel, could you please
2010 Nov 02
2
[RFC][PATCH] direct-io: btrfs: avoid splitting dio requests for non-btrfs filesystems
...te(cached_state); cached_state = NULL; + /* btrfs cannot handle logically non-contiguous requests */ + kiocb_set_separate_meta_reads(iocb); + ret = __blockdev_direct_IO(rw, iocb, inode, BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev, iov, offset, nr_segs, btrfs_get_blocks_direct, NULL, diff --git a/fs/direct-io.c b/fs/direct-io.c index 48d74c7..6d2dcb2 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -35,6 +35,7 @@ #include <linux/buffer_head.h> #include <linux/rwsem.h> #include <linux/uio.h> +#include <linux/aio.h> #include <asm/a...
2004 Sep 10
0
reading vorbis comments with FLAC++?
...9;s one link: http://flac.sourceforge.net/api/group__flac__metadata__level1.html#_details The C++ interface is a little simpler: FLAC::Metadata::SimpleIterator it; if (it.is_valid()) { if (it.init(filename, true, true)) { FLAC::Metadata::VorbisComment *vc = 0; do { if (it.get_block_type() == ::FLAC__METADATA_TYPE_VORBIS_COMMENT) { vc = dynamic_cast<FLAC::Metadata::VorbisComment*>(it.get_block()); assert(0 != vc); } } while (!vc && it.next()); //use vc delete vc; } } maybe I should add a shorthand function si...
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 +++++++-----------------
2023 Jul 02
0
+ fs-buffer-clean-up-block_commit_write.patch added to mm-unstable branch
...ruct inode *inode = folio->mapping->host; - __block_commit_write(inode, folio, from, to); + __block_commit_write(folio, from, to); return 0; } EXPORT_SYMBOL(block_commit_write); @@ -2650,7 +2648,7 @@ int block_page_mkwrite(struct vm_area_st ret = __block_write_begin_int(folio, 0, end, get_block, NULL); if (!ret) - ret = __block_commit_write(inode, folio, 0, end); + ret = __block_commit_write(folio, 0, end); if (unlikely(ret < 0)) goto out_unlock; _ Patches currently in -mm which might be from beanhuo at micron.com are fs-buffer-clean-up-block_commit_write.patch fs-convert-...
2008 Feb 02
16
[patch 00/16] ocfs2: SLES10 compatibility patch queue
Here is the original set of fixes, split out into 14 individual ones. In addition to splitting them out, I also changed the ones that were HAS_* to NO_* as requested. The last two patches are needed to build on openSUSE 10.3 which is based on 2.6.22. I used it as a sanity check and found those failures. -Jeff -- Jeff Mahoney SUSE Labs
2004 Sep 10
3
reading vorbis comments with FLAC++?
Well, I'm quite frankly stumped. I'm writing a program that recurses into directories and reads (among others) FLAC files and should be able to read the vorbis comments ARTIST and TITLE from the file. A while back, I was popen()ing to metaflac, because I didn't want to mess with libFLAC. But now, it's the weekend, so I can mess around with this. Here's the code in question:
2019 Jan 02
0
[PATCH nbdkit v2 1/2] Annotate internal function parameters with attribute((nonnull)).
...z/blkcache.h b/filters/xz/blkcache.h index e68f5d1..c86c8e8 100644 --- a/filters/xz/blkcache.h +++ b/filters/xz/blkcache.h @@ -42,9 +42,13 @@ typedef struct blkcache_stats { } blkcache_stats; extern blkcache *new_blkcache (size_t maxdepth); -extern void free_blkcache (blkcache *); -extern char *get_block (blkcache *, uint64_t offset, uint64_t *start, uint64_t *size); -extern int put_block (blkcache *, uint64_t start, uint64_t size, char *data); -extern void blkcache_get_stats (blkcache *, blkcache_stats *ret); +extern void free_blkcache (blkcache *) __attribute__((__nonnull__ (1))); +extern char *g...
2013 Apr 06
1
[PATCH 3/4] fsfreeze: manage kill signal when sb_start_pagefault is called
...; /* * Update file times before taking page lock. We may end up failing the diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index b3a5213..efc47f6 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -5023,7 +5023,9 @@ int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) get_block_t *get_block; int retries = 0; - sb_start_pagefault(inode->i_sb); + ret = sb_start_pagefault(inode->i_sb); + if (ret) + return VM_FAULT_RETRY; file_update_time(vma->vm_file); /* Delalloc case is easy... */ if (test_opt(inode->i_sb, DELALLOC) && diff --git a/fs/f2fs/fi...