search for: i_siz

Displaying 20 results from an estimated 143 matches for "i_siz".

Did you mean: i_size
2010 Jan 22
2
[PATCH -v2] btrfs: Use correct values when updating inode i_size on fallocate
Even though we allocate more, we should be updating inode i_size as per the arguments passed Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> --- Changes from V1: We should update i_size only if actual_len and cur_offset are both larger than i_size. Otherwise if actual_len is < i_size and cur_offset > i_size we may end up settin...
2010 Jul 12
1
[PATCH] ocfs2: Don't duplicate page passes i_size during CoW.
During CoW, actually all the pages after i_size contains garbage data, so don't read and duplicate them. Signed-off-by: Tao Ma <tao.ma at oracle.com> --- fs/ocfs2/refcounttree.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 1cf9cda..e082623 1...
2009 Apr 07
0
[PATCH 1/1] OCFS2: use i_size_read() instead of direct accessing inode->i_size
use i_size_read() instead of accessing inode->i_size directly. Signed-off-by: Wengang Wang <wen.gang.wang at oracle.com> -- diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index b2c52b3..4491851 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -1920,7 +1920,7 @@ int ocfs2_write_end_nolock(struc...
2011 May 19
3
SEEK_DATA/HOLE on ocfs2 - v2
Two patches follow this message. One fixes the default implementation of SEEK_HOLE/DATA. This patch applies atop Josef's last posted patch. The second patch implements the same on ocfs2. The test tool for the same is available here. http://oss.oracle.com/~smushran/seek_data/seek_test.c It is improved since the last post. It runs cleanly on zfs, ocfs2 and ext3 (default behavior). Users
2011 May 19
3
SEEK_DATA/HOLE on ocfs2 - v2
Two patches follow this message. One fixes the default implementation of SEEK_HOLE/DATA. This patch applies atop Josef's last posted patch. The second patch implements the same on ocfs2. The test tool for the same is available here. http://oss.oracle.com/~smushran/seek_data/seek_test.c It is improved since the last post. It runs cleanly on zfs, ocfs2 and ext3 (default behavior). Users
2010 Nov 22
0
[PATCH] Btrfs: fix typo in fallocate to make it honor actual size
There is a typo in __btrfs_prealloc_file_range() where we set the i_size to actual_len/cur_offset, and then just set it to cur_offset again, and do the same with btrfs_ordered_update_i_size(). This fixes it back to keeping i_size in a local variable and then updating i_size properly. Tested this with xfs_io -F -f -c "falloc 0 1" -c "pwrite 0 1" f...
2008 Jun 04
1
OCFS2 and direct-io writes
...tents if they exists. With these changes, a single/local OCFS2 filesystem will allow me to write/create files using large, direct-io. All the write requests go straight through to the storage. And the write performance is very close to that of XFS. But, in a distributed environment the inode->i_size does not get syncronized with the other nodes in the cluster. The direct-io path does not syncronize the inode->i_size. Would it be possible to safely to update the i_size for all nodes in a cluster, without causing any races or other problems? If so, does anyone have any suggestions as to ho...
2002 Jul 17
3
Maximum File Size on Ext2/3
I need to find out what the maximum file size in an ext2/3 file system. It appears from the definition of the ext2_inode structure that since the i_size field is a 32 bit integer that the file would be limited by that. Thanks, Jason
2007 Oct 04
1
lustre e2fsck corrupts files by changing i_size
...ustre 3. I umount Lustre file system on this client node then stop Lustre file system 4. I use then : /usr/lib/lustre/e2fsck /dev/OSTs-device And big surprise : for each files created on the Lustre file system, it displays the following : Pass 1: Checking inodes, blocks, and sizes Inode 163882, i_size is 199041, should be 262144. Fix? The real size of my file is 199041 ! So if I choose "Yes" to the question, This file will be corrupted. Additional info : my device Block size is 4096 I think there is an error in the test code of the phase1. What do you think ? Do I need to open a...
2013 Jun 20
2
[PATCH] ocfs2: llseek requires to ocfs2 inode lock for the file in SEEK_END
...t, int whence) case SEEK_SET: break; case SEEK_END: + /* SEEK_END requires the OCFS2 inode lock for the file + * because it references the file's size. + */ + ret = ocfs2_inode_lock(inode, NULL, 0); + if (ret < 0) { + mlog_errno(ret); + goto out; + } offset += inode->i_size; + ocfs2_inode_unlock(inode, 0); break; case SEEK_CUR: if (offset == 0) { -- 1.7.9.7
2010 Apr 26
0
[PATCH V2 11/12] Btrfs: Pre-allocate space for data relocation
...int mode, + u64 start, u64 num_bytes, u64 min_size, + loff_t actual_len, u64 *alloc_hint) { struct btrfs_trans_handle *trans; struct btrfs_root *root = BTRFS_I(inode)->root; struct btrfs_key ins; u64 cur_offset = start; - u64 num_bytes = end - start; int ret = 0; - u64 i_size; while (num_bytes > 0) { trans = btrfs_start_transaction(root, 3); @@ -6097,9 +6103,8 @@ static int prealloc_file_range(struct in break; } - ret = btrfs_reserve_extent(trans, root, num_bytes, - root->sectorsize, 0, alloc_hint, - (u64)-1, &ins, 1); + ret =...
2009 Dec 13
4
cp --reflink with Btrfs
I am testing a Btrfs root file system with Debian (kernel 2.6.32) under KVM. jason@vrtl:~$ touch testfile jason@vrtl:~$ cp --reflink testfile /tmp cp: failed to clone `/tmp/testfile'': Invalid argument This is with GNU Coreutils 8.0 taken from debian Sid. Is this a Coreutils issue, a Btrfs problem or something in my local configuration? All the other issues that I have encountered so
2009 Feb 03
1
Problem with ordered mode handling on truncate
...1: CPU 2: jbd2_journal_begin_ordered_truncate(inode, 0) write(trans, inode, ...) discard data of "inode" commit "trans" ---- CRASH The correct fix to this problem is to call jbd2_journal_begin_ordered_truncate() after inode has been added to orphan list (new i_size written respectively). That function is called from two places: 1) ocfs2_truncate_for_delete() - easy to fix, just move the call just after the write of the inode. 2) ocfs2_setattr() - we can move the call into ocfs2_truncate_file() but that would mean calling jbd2_journal_begin_ordered_trun...
2001 Dec 18
1
[PATCH]: Fix environment variable size restriction in Cygwin version
...17:26:49 -0000 1.158 +++ session.c 18 Dec 2001 19:07:14 -0000 @@ -918,25 +918,29 @@ void do_pam_environment(char ***env, u_i #ifdef HAVE_CYGWIN void copy_environment(char ***env, u_int *envsize) { - char *equals, var_name[512], var_val[512]; + char *var_name = NULL, *var_val; + size_t size = 0, i_size; int i; for(i = 0; environ[i] != NULL; i++) { - if ((equals = strstr(environ[i], "=")) == NULL) + if ((i_size = strlen(environ[i]) + 1) < 3) continue; - if (strlen(environ[i]) < (sizeof(var_name) - 1)) { - memset(var_name, '\0', sizeof(var_name)); - memse...
2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
...at truncated file. And besides that, if the user does pre-allocation for the file which is truncated unsuccessfully, after re-mount(umount-mount, not -o remount), the pre-allocated extent will be dropped. This patch modified the relative functions of the truncation, and makes the truncation update i_size and disk_i_size of i-nodes every time we drop the file extent successfully, and set them to the real value. By this way, we needn''t add orphan items to guarantee the consistency of the meta-data. By this patch, it is possible that the file may not be truncated to the size that the user e...
2010 Jul 16
1
[PATCH] ocfs2: make __ocfs2_page_mkwrite handle file end properly.
__ocfs2_page_mkwrite now is broken in handling file end. 1. the last page should be the page contains i_size - 1. 2. the len in the last page is also calculated wrong. So change them accordingly. Signed-off-by: Tao Ma <tao.ma at oracle.com> --- fs/ocfs2/mmap.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c index af2b8fe..4c18f4a 1...
2010 Jun 12
0
[PATCH] Btrfs: fix CLONE ioctl destination file size expansion to block boundary
The CLONE and CLONE_RANGE ioctls round up the range of extents being cloned to the block size when the range to clone extends to the end of file (this is always the case with CLONE). It was then using that offset when extending the destination file''s i_size. Fix this by not setting i_size beyond the originally requested ending offset. This bug was introduced by a22285a6 (2.6.35-rc1). Signed-off-by: Sage Weil <sage@newdream.net> --- fs/btrfs/ioctl.c | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/fs/b...
2010 Jul 16
0
[GIT PULL] Important ocfs2 fixes for 2.6.35
...t as these major fixes have been tested, I didn't want to delay them any longer. The first major fix you know about: the tail zeroing fix when extending files. It's been run under heavy testing for a week now, and we're quite happy. We should also no longer be touching any pages past i_size in write or CoW. The second major fix was discovered and fixed by Mark and Jan. The jbd2 triggers we added for block checksumming had a small window where the checksum from transaction N-2 could be written in transaction N-1 because transaction N accessed the buffer but never actually modified it...
2006 Aug 16
2
RedHat Node Panic Weekly
...ng here? I have a 3 node cluster running under RH AS 4 (2.6.9-34.ELsmp) with ocfs2 v. 1.2.1. I've upgraded to 1.2.1 as suggested in the previous post, but one or more of my nodes continues to panic weekly: Aug 16 15:29:02 linux96 kernel: (6670,2):ocfs2_extend_file:787 ERROR: bug expression: i_size_read(inode) != (le64_to_cpu(fe->i_size) - *bytes_extended) Aug 16 15:29:02 linux96 kernel: (6670,2):ocfs2_extend_file:787 ERROR: Inode 1067290 i_size = 6073937, dinode i_size = 6074345, bytes_extended = 0, new_i_size = 6074037 Aug 16 15:29:02 linux96 kernel: ------------[ cut here ]------------...
2006 Jun 12
1
kernel BUG at /usr/src/ocfs2-1.2.1/fs/ocfs2/file.c:494!
...2006 (build bd2f25ba0af9677db3572e3ccd92f739) ocfs2_dlm: Nodes in domain ("8B6DD64326394C308A4E2B2259162C78"): 0 1 kjournald starting. Commit interval 5 seconds ocfs2: Mounting device (147,0) on (node 0, slot 1) (16918,0):ocfs2_truncate_file:494 ERROR: bug expression: le64_to_cpu(fe->i_size) != i_size_read(inode) (16918,0):ocfs2_truncate_file:494 ERROR: Inode 42363033, inode i_size = 1129 != di i_size = 1120, i_flags = 0x1 ------------[ cut here ]------------ kernel BUG at /usr/src/ocfs2-1.2.1/fs/ocfs2/file.c:494! invalid opcode: 0000 [#1] SMP Modules linked in: ocfs2 sha1 ocfs2_dlm...