search for: file_offset

Displaying 20 results from an estimated 31 matches for "file_offset".

2013 Aug 29
0
[PATCH] Btrfs: allow partial ordered extent completion
...(!list_empty(&ordered_extent->list)); /* Logic error */ btrfs_ordered_update_i_size(inode, 0, ordered_extent); @@ -2627,15 +2637,14 @@ static int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent) ret = btrfs_mark_extent_written(trans, inode, ordered_extent->file_offset, ordered_extent->file_offset + - ordered_extent->len); + logical_len); } else { BUG_ON(root == root->fs_info->tree_root); ret = insert_reserved_file_extent(trans, inode, ordered_extent->file_offset, ordered_extent->start, ordered_exten...
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
2011 Sep 28
3
[PATCH] Btrfs: fix missing clear_extent_bit
...clear_unlock_delalloc(inode, &BTRFS_I(inode)->io_tree, start, start + ram_size - 1, @@ -1778,6 +1778,9 @@ static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64 end) ordered_extent->len); BUG_ON(ret); } + clear_extent_bit(io_tree, ordered_extent->file_offset, + ordered_extent->file_offset + ordered_extent->len - 1, + EXTENT_DIRTY, 0, 0, &cached_state, GFP_NOFS); unlock_extent_cached(io_tree, ordered_extent->file_offset, ordered_extent->file_offset + ordered_extent->len - 1, &cached_state, GFP_NOFS); --...
2011 Aug 15
9
[patch v2 0/9] btrfs: More error handling patches
Hi all - The following 9 patches add more error handling to the btrfs code: - Add btrfs_panic - Catch locking failures in {set,clear}_extent_bit - Push up set_extent_bit errors to callers - Push up lock_extent errors to callers - Push up clear_extent_bit errors to callers - Push up unlock_extent errors to callers - Make pin_down_extent return void - Push up btrfs_pin_extent errors to
2012 Jun 19
0
[LLVMdev] llvm/include/Support/FileSystem.h
This is a proposed patch to enhance FileSystem.h to add functionality (getting and setting permission bits and mapping an unmapping files). This implementation follows the N3365 proposal regarding permission bits. This functionality is needed for my next patch which will implement llvm/include/Support/FileOutputBuffer.h which is needed by lld. -------------- next part -------------- A
2010 Mar 22
0
[PATCH] Btrfs: change direct I/O read to not use i_mutex.
...compressed data, + * while we can read a single block of valid uncompressed data. + */ + if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) + stop = em->start + em->len; + else + stop = diocb->lockstart + + BTRFS_I(diocb->inode)->root->sectorsize; + + if (ordered->file_offset < stop) { + unlock_extent(io_tree, diocb->lockstart, *lockend, GFP_NOFS); + btrfs_start_ordered_extent(diocb->inode, ordered, 1); + btrfs_put_ordered_extent(ordered); + *safe_to_read = 0; + return; + } + + /* do the part of the data that is valid to read now with the + * remainder un...
2012 May 18
2
[LLVMdev] [RFC] llvm/include/Support/FileOutputBuffer.h
On Fri, May 18, 2012 at 3:07 PM, Michael Spencer <bigcheesegs at gmail.com> wrote: > >> +  error_code ec = sys::fs::status(filePathTwine, stat); > > stat is undefined if ec isn't success. ec will be success even in the case of > file_not_found. Actually I was wrong. The Windows and UNIX implementation disagree on this point. I'm going to change it to match
2012 Mar 31
2
[PATCH v6] hivexml: Add byte run reporting functions
...ent, (writer, BAD_CAST "byte_runs")); + XML_CHECK (xmlTextWriterStartElement, (writer, BAD_CAST "byte_run")); + memset (buf, 0, 1+BYTE_RUN_BUF_LEN); + snprintf (buf, 1+BYTE_RUN_BUF_LEN, "%zu", node); + XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST "file_offset", BAD_CAST buf)); + snprintf (buf, 1+BYTE_RUN_BUF_LEN, "%zu", node_struct_length); + XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST "len", BAD_CAST buf)); + XML_CHECK (xmlTextWriterEndElement, (writer)); + XML_CHECK (xmlTextWriterEndElement, (writer)); + ret...
2014 Apr 09
0
Error: broken sync positions in index file
...ydomain.com): Error: Fixed index file /home/myuser/mail/mydomain.com/myuser/dovecot.index: log_file_tail_offset 164 -> 144 Mar 23 16:13:27 andromeda dovecot: pop3(myuser at mydomain.com): Panic: file mail-transaction-log.c: line 350 (mail_transaction_log_set_mailbox_sync_pos): assertion failed: (file_offset >= log->head->saved_tail_offset) Mar 23 16:13:27 andromeda dovecot: pop3(myuser at mydomain.com): Fatal: master: service(pop3): child 3983 killed with signal 6 (core dumps disabled) Mar 23 16:13:27 andromeda dovecot: pop3: Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0 [0xb7e59350]...
2013 Jan 30
0
[PATCH] Btrfs: fix possible stale data exposure
..., 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index f8b13e8..cd8f6e9 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -936,7 +936,7 @@ int btrfs_ordered_update_i_size(struct inode *inode, u64 offset, break; if (test->file_offset >= i_size) break; - if (test->file_offset >= disk_i_size) { + if (entry_end(test) > disk_i_size) { /* * we don''t update disk_i_size now, so record this * undealt i_size. Or we will not know the real -- 1.7.7.6 -- To unsubscribe from this list: send the lin...
2011 Dec 08
1
[hivex] [PATCH 8/8] hivexml: Add byte run reporting functions
...ment, (writer, BAD_CAST "byte_runs")); + XML_CHECK (xmlTextWriterStartElement, (writer, BAD_CAST "byte_run")); + memset (buf, 0, 1+BYTE_RUN_BUF_LEN); + snprintf (buf, 1+BYTE_RUN_BUF_LEN, "%d", node); + XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST "file_offset", BAD_CAST buf)); + snprintf (buf, 1+BYTE_RUN_BUF_LEN, "%d", node_struct_length); + XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST "len", BAD_CAST buf)); + XML_CHECK (xmlTextWriterEndElement, (writer)); + XML_CHECK (xmlTextWriterEndElement, (writer)); + retu...
2013 Oct 25
0
[PATCH] Btrfs: return an error from btrfs_wait_ordered_range
...+ ret = filemap_fdatawait_range(inode->i_mapping, start, orig_end); + if (ret) + return ret; end = orig_end; while (1) { @@ -788,11 +795,14 @@ void btrfs_wait_ordered_range(struct inode *inode, u64 start, u64 len) } btrfs_start_ordered_extent(inode, ordered, 1); end = ordered->file_offset; + if (test_bit(BTRFS_ORDERED_IOERR, &ordered->flags)) + ret = -EIO; btrfs_put_ordered_extent(ordered); - if (end == 0 || end == start) + if (ret || end == 0 || end == start) break; end--; } + return ret; } /* diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data....
2008 Nov 24
2
Indexes recovery failed
...Fixed index file /virtual/store2/mail/s/bobuser_maildom.com/Maildir/dovecot.index: log_file_tail_offset 2273345664 -> 996 Nov 19 17:11:32 mink dovecot: Panic: IMAP(bobuser at maildom.com): file mail-transaction-log.c: line 341 (mail_transaction_log_set_mailbox_sync_pos): assertion failed: (file_offset >= log->head->saved_tail_offset) Nov 19 17:11:32 mink dovecot: IMAP(bobuser at maildom.com): Raw backtrace: imap [0x46c772] -> imap [0x46c7e3] -> imap [0x46be56] -> imap [0x452d6d] -> imap(mail_index_sync_commit+0x42) [0x44e022] -> imap(maildir_sync_index_finish+0xdd) [0x...
2004 Dec 20
1
HP-UX/AIX sendfile patches.
...support],samba_cv_HAVE_SENDFILE,[ + AC_TRY_LINK([\ + #include <sys/socket.h>], + [\ + int fromfd, tofd; + size_t total=0; + struct sf_parms hdtrl; + ssize_t nwritten; + off64_t offset; + + hdtrl.header_data = 0; + hdtrl.header_length = 0; + hdtrl.file_descriptor = fromfd; + hdtrl.file_offset = 0; + hdtrl.file_bytes = 0; + hdtrl.trailer_data = 0; + hdtrl.trailer_length = 0; + + nwritten = send_file(&tofd, &hdtrl, 0); + ], + samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) + if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then + AC_DEFINE(HAVE_...
2008 Oct 27
0
[PATCH 3/4] update nodatacow code
...data.c 4/fs/btrfs/ordered-data.c --- 3/fs/btrfs/ordered-data.c 2008-10-24 09:18:54.000000000 +0800 +++ 4/fs/btrfs/ordered-data.c 2008-10-27 16:37:28.000000000 +0800 @@ -165,7 +165,7 @@ static inline struct rb_node *tree_searc * inserted. */ int btrfs_add_ordered_extent(struct inode *inode, u64 file_offset, - u64 start, u64 len, int nocow) + u64 start, u64 len, int type) { struct btrfs_ordered_inode_tree *tree; struct rb_node *node; @@ -181,8 +181,9 @@ int btrfs_add_ordered_extent(struct inod entry->start = start; entry->len = len; entry->inode = inode; - if (nocow)...
2012 May 18
0
[LLVMdev] [RFC] llvm/include/Support/FileOutputBuffer.h
...or_construct(detail::DirIterState &it, > StringRef path){ > SmallString<128> path_null(path); > @@ -496,6 +532,97 @@ > return error_code::success(); > } > > +error_code map_file_pages(const Twine &path, off_t file_offset, size_t size, > + bool map_writable, void *&result) { > + SmallString<128> path_storage; > + StringRef name = path.toNullTerminatedStringRef(path_storage); > + int oflags = map_writable ? O_RDWR : O_RDONLY; > + int fd = ::open(...
2012 May 17
3
[LLVMdev] [RFC] llvm/include/Support/FileOutputBuffer.h
I now have an implementation of FileOutputBuffer (OutputBuffer was already taken). The patch supports the functionality listed below and I've tested that it works for lld. -------------- next part -------------- A non-text attachment was scrubbed... Name: FileOutputBuffer.patch Type: application/octet-stream Size: 25308 bytes Desc: not available URL:
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
...fer *eb); int btrfs_try_spin_lock(struct extent_buffer *eb); diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index a1c9404..8f4d150 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -249,9 +249,9 @@ int btrfs_add_ordered_extent_compress(struct inode *inode, u64 file_offset, * when an ordered extent is finished. If the list covers more than one * ordered extent, it is split across multiples. */ -int btrfs_add_ordered_sum(struct inode *inode, - struct btrfs_ordered_extent *entry, - struct btrfs_ordered_sum *sum) +void btrfs_add_ordered_sum(struct inode *...
2011 Oct 04
68
[patch 00/65] Error handling patchset v3
Hi all - Here''s my current error handling patchset, against 3.1-rc8. Almost all of this patchset is preparing for actual error handling. Before we start in on that work, I''m trying to reduce the surface we need to worry about. It turns out that there is a ton of code that returns an error code but never actually reports an error. The patchset has grown to 65 patches. 46 of them
2012 Sep 17
13
[PATCH 1/2 v3] Btrfs: use flag EXTENT_DEFRAG for snapshot-aware defrag
We''re going to use this flag EXTENT_DEFRAG to indicate which range belongs to defragment so that we can implement snapshow-aware defrag: We set the EXTENT_DEFRAG flag when dirtying the extents that need defragmented, so later on writeback thread can differentiate between normal writeback and writeback started by defragmentation. This patch is used for the latter one. Originally patch