<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ext4/file.c, branch linux-2.6.37.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2010-10-28T01:30:06Z</updated>
<entry>
<title>ext4: improve llseek error handling for overly large seek offsets</title>
<updated>2010-10-28T01:30:06Z</updated>
<author>
<name>Toshiyuki Okajima</name>
</author>
<published>2010-10-28T01:30:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e0d10bfa91b0a089a9e2c378b5c42f4e96171d95'/>
<id>urn:sha1:e0d10bfa91b0a089a9e2c378b5c42f4e96171d95</id>
<content type='text'>
The llseek system call should return EINVAL if passed a seek offset
which results in a write error.  What this maximum offset should be
depends on whether or not the huge_file file system feature is set,
and whether or not the file is extent based or not.


If the file has no "EXT4_EXTENTS_FL" flag, the maximum size which can be 
written (write systemcall) is different from the maximum size which can be 
sought (lseek systemcall).

For example, the following 2 cases demonstrates the differences
between the maximum size which can be written, versus the seek offset
allowed by the llseek system call:

#1: mkfs.ext3 &lt;dev&gt;; mount -t ext4 &lt;dev&gt;
#2: mkfs.ext3 &lt;dev&gt;; tune2fs -Oextent,huge_file &lt;dev&gt;; mount -t ext4 &lt;dev&gt;

Table. the max file size which we can write or seek
       at each filesystem feature tuning and file flag setting
+============+===============================+===============================+
| \ File flag|                               |                               |
|      \     |     !EXT4_EXTENTS_FL          |        EXT4_EXTETNS_FL        |
|case       \|                               |                               |
+------------+-------------------------------+-------------------------------+
| #1         |   write:      2194719883264   | write:       --------------   |
|            |   seek:       2199023251456   | seek:        --------------   |
+------------+-------------------------------+-------------------------------+
| #2         |   write:      4402345721856   | write:       17592186044415   |
|            |   seek:      17592186044415   | seek:        17592186044415   |
+------------+-------------------------------+-------------------------------+

The differences exist because ext4 has 2 maxbytes which are sb-&gt;s_maxbytes
(= extent-mapped maxbytes) and EXT4_SB(sb)-&gt;s_bitmap_maxbytes (= block-mapped 
maxbytes).  Although generic_file_llseek uses only extent-mapped maxbytes.
(llseek of ext4_file_operations is generic_file_llseek which uses
sb-&gt;s_maxbytes.)

Therefore we create ext4 llseek function which uses 2 maxbytes.

The new own function originates from generic_file_llseek().
If the file flag, "EXT4_EXTENTS_FL" is not set, the function alters 
inode-&gt;i_sb-&gt;s_maxbytes into EXT4_SB(inode-&gt;i_sb)-&gt;s_bitmap_maxbytes.

Signed-off-by: Toshiyuki Okajima &lt;toshi.okajima@jp.fujitsu.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: Andreas Dilger &lt;adilger.kernel@dilger.ca&gt;
</content>
</entry>
<entry>
<title>ext4: fix EFBIG edge case when writing to large non-extent file</title>
<updated>2010-07-27T15:56:07Z</updated>
<author>
<name>Toshiyuki Okajima</name>
</author>
<published>2010-07-27T15:56:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d889dc8382c4d71b6d538b7b13777bc1ec51df10'/>
<id>urn:sha1:d889dc8382c4d71b6d538b7b13777bc1ec51df10</id>
<content type='text'>
By running the following reproducer, we can confirm that the write 
system call returns with 0 when it should return the error EFBIG.

#!/bin/sh

/bin/dd if=/dev/zero of=./img bs=1k count=1 seek=1024k &gt; /dev/null 2&gt;&amp;1
/sbin/mkfs.ext3 -Fq ./img
/bin/mount -o loop -t ext4 ./img /mnt
/bin/touch /mnt/file
strace /bin/dd if=/dev/zero of=/mnt/file conv=notrunc bs=1k count=1 seek=$((2194719883264/1024)) 2&gt;&amp;1 | /bin/egrep "write.* 1024\) = "
/bin/umount /mnt
exit

Signed-off-by: Toshiyuki Okajima &lt;toshi.okajima@jp.fujitsu.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: Eric Sandeen &lt;sandeen@redhat.com&gt;
</content>
</entry>
<entry>
<title>ext4: Clean up s_dirt handling</title>
<updated>2010-06-12T03:14:04Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2010-06-12T03:14:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a0375156ca1041574b5d47cc7e32f10b891151b0'/>
<id>urn:sha1:a0375156ca1041574b5d47cc7e32f10b891151b0</id>
<content type='text'>
We don't need to set s_dirt in most of the ext4 code when journaling
is enabled.  In ext3/4 some of the summary statistics for # of free
inodes, blocks, and directories are calculated from the per-block
group statistics when the file system is mounted or unmounted.  As a
result the superblock doesn't have to be updated, either via the
journal or by setting s_dirt.  There are a few exceptions, most
notably when resizing the file system, where the superblock needs to
be modified --- and in that case it should be done as a journalled
operation if possible, and s_dirt set only in no-journal mode.

This patch will optimize out some unneeded disk writes when using ext4
with a journal.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>ext4: Use bitops to read/modify i_flags in struct ext4_inode_info</title>
<updated>2010-05-17T02:00:00Z</updated>
<author>
<name>Dmitry Monakhov</name>
</author>
<published>2010-05-17T02:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=12e9b892002d9af057655d35b44db8ee9243b0dc'/>
<id>urn:sha1:12e9b892002d9af057655d35b44db8ee9243b0dc</id>
<content type='text'>
At several places we modify EXT4_I(inode)-&gt;i_flags without holding
i_mutex (ext4_do_update_inode, ...). These modifications are racy and
we can lose updates to i_flags. So convert handling of i_flags to use
bitops which are atomic.

https://bugzilla.kernel.org/show_bug.cgi?id=15792

Signed-off-by: Dmitry Monakhov &lt;dmonakhov@openvz.org&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6</title>
<updated>2010-03-05T21:20:53Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2010-03-05T21:20:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e213e26ab3988c516c06eba4dcd030ac052f6dc9'/>
<id>urn:sha1:e213e26ab3988c516c06eba4dcd030ac052f6dc9</id>
<content type='text'>
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: (33 commits)
  quota: stop using QUOTA_OK / NO_QUOTA
  dquot: cleanup dquot initialize routine
  dquot: move dquot initialization responsibility into the filesystem
  dquot: cleanup dquot drop routine
  dquot: move dquot drop responsibility into the filesystem
  dquot: cleanup dquot transfer routine
  dquot: move dquot transfer responsibility into the filesystem
  dquot: cleanup inode allocation / freeing routines
  dquot: cleanup space allocation / freeing routines
  ext3: add writepage sanity checks
  ext3: Truncate allocated blocks if direct IO write fails to update i_size
  quota: Properly invalidate caches even for filesystems with blocksize &lt; pagesize
  quota: generalize quota transfer interface
  quota: sb_quota state flags cleanup
  jbd: Delay discarding buffers in journal_unmap_buffer
  ext3: quota_write cross block boundary behaviour
  quota: drop permission checks from xfs_fs_set_xstate/xfs_fs_set_xquota
  quota: split out compat_sys_quotactl support from quota.c
  quota: split out netlink notification support from quota.c
  quota: remove invalid optimization from quota_sync_all
  ...

Fixed trivial conflicts in fs/namei.c and fs/ufs/inode.c
</content>
</entry>
<entry>
<title>Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4</title>
<updated>2010-03-05T18:47:00Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2010-03-05T18:47:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f63b9c15b17d5af360c180f5c71537e954d5d3b'/>
<id>urn:sha1:1f63b9c15b17d5af360c180f5c71537e954d5d3b</id>
<content type='text'>
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (36 commits)
  ext4: fix up rb_root initializations to use RB_ROOT
  ext4: Code cleanup for EXT4_IOC_MOVE_EXT ioctl
  ext4: Fix the NULL reference in double_down_write_data_sem()
  ext4: Fix insertion point of extent in mext_insert_across_blocks()
  ext4: consolidate in_range() definitions
  ext4: cleanup to use ext4_grp_offs_to_block()
  ext4: cleanup to use ext4_group_first_block_no()
  ext4: Release page references acquired in ext4_da_block_invalidatepages
  ext4: Fix ext4_quota_write cross block boundary behaviour
  ext4: Convert BUG_ON checks to use ext4_error() instead
  ext4: Use direct_IO_no_locking in ext4 dio read
  ext4: use ext4_get_block_write in buffer write
  ext4: mechanical rename some of the direct I/O get_block's identifiers
  ext4: make "offset" consistent in ext4_check_dir_entry()
  ext4: Handle non empty on-disk orphan link
  ext4: explicitly remove inode from orphan list after failed direct io
  ext4: fix error handling in migrate
  ext4: deprecate obsoleted mount options
  ext4: Fix fencepost error in chosing choosing group vs file preallocation.
  jbd2: clean up an assertion in jbd2_journal_commit_transaction()
  ...
</content>
</entry>
<entry>
<title>dquot: cleanup dquot initialize routine</title>
<updated>2010-03-04T23:20:30Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2010-03-03T14:05:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=871a293155a24554e153538d36e3a80fa169aefb'/>
<id>urn:sha1:871a293155a24554e153538d36e3a80fa169aefb</id>
<content type='text'>
Get rid of the initialize dquot operation - it is now always called from
the filesystem and if a filesystem really needs it's own (which none
currently does) it can just call into it's own routine directly.

Rename the now static low-level dquot_initialize helper to __dquot_initialize
and vfs_dq_init to dquot_initialize to have a consistent namespace.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>dquot: move dquot initialization responsibility into the filesystem</title>
<updated>2010-03-04T23:20:30Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2010-03-03T14:05:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=907f4554e2521cb28b0009d17167760650a9561c'/>
<id>urn:sha1:907f4554e2521cb28b0009d17167760650a9561c</id>
<content type='text'>
Currently various places in the VFS call vfs_dq_init directly.  This means
we tie the quota code into the VFS.  Get rid of that and make the
filesystem responsible for the initialization.   For most metadata operations
this is a straight forward move into the methods, but for truncate and
open it's a bit more complicated.

For truncate we currently only call vfs_dq_init for the sys_truncate case
because open already takes care of it for ftruncate and open(O_TRUNC) - the
new code causes an additional vfs_dq_init for those which is harmless.

For open the initialization is moved from do_filp_open into the open method,
which means it happens slightly earlier now, and only for regular files.
The latter is fine because we don't need to initialize it for operations
on special files, and we already do it as part of the namespace operations
for directories.

Add a dquot_file_open helper that filesystems that support generic quotas
can use to fill in -&gt;open.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>Get rid of mnt_mountpoint abuses in ext4</title>
<updated>2010-03-03T19:07:54Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2010-01-24T01:10:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3899167dbd6832a3d8d7171b425257ad46b6c40c'/>
<id>urn:sha1:3899167dbd6832a3d8d7171b425257ad46b6c40c</id>
<content type='text'>
path to mnt/mnt-&gt;mnt_root is no worse than that to
mnt-&gt;mnt_parent/mnt-&gt;mnt_mountpoint *and* needs no
pinning the sucker down (mnt is not going away and
mnt-&gt;mnt_root won't change)

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ext4: Use bitops to read/modify EXT4_I(inode)-&gt;i_state</title>
<updated>2010-01-24T19:34:07Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2010-01-24T19:34:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19f5fb7ad679bb361222c7916086435020c37cce'/>
<id>urn:sha1:19f5fb7ad679bb361222c7916086435020c37cce</id>
<content type='text'>
At several places we modify EXT4_I(inode)-&gt;i_state without holding
i_mutex (ext4_release_file, ext4_bmap, ext4_journalled_writepage,
ext4_do_update_inode, ...). These modifications are racy and we can
lose updates to i_state. So convert handling of i_state to use bitops
which are atomic.

Cc: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
</feed>
