<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/libfs.c, branch v2.6.35.9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/libfs.c?h=v2.6.35.9</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/libfs.c?h=v2.6.35.9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-06-04T21:16:28Z</updated>
<entry>
<title>wrong type for 'magic' argument in simple_fill_super()</title>
<updated>2010-06-04T21:16:28Z</updated>
<author>
<name>Roberto Sassu</name>
<email>roberto.sassu@polito.it</email>
</author>
<published>2010-06-03T09:58:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7d683a09990ff095a91b6e724ecee0ff8733274a'/>
<id>urn:sha1:7d683a09990ff095a91b6e724ecee0ff8733274a</id>
<content type='text'>
It's used to superblock -&gt;s_magic, which is unsigned long.

Signed-off-by: Roberto Sassu &lt;roberto.sassu@polito.it&gt;
Reviewed-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
CC: stable@kernel.org
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs: introduce new truncate sequence</title>
<updated>2010-05-28T02:15:33Z</updated>
<author>
<name>npiggin@suse.de</name>
<email>npiggin@suse.de</email>
</author>
<published>2010-05-26T15:05:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7bb46a6734a7e1ad4beaecc11cae7ed3ff81d30f'/>
<id>urn:sha1:7bb46a6734a7e1ad4beaecc11cae7ed3ff81d30f</id>
<content type='text'>
Introduce a new truncate calling sequence into fs/mm subsystems. Rather than
setattr &gt; vmtruncate &gt; truncate, have filesystems call their truncate sequence
from -&gt;setattr if filesystem specific operations are required. vmtruncate is
deprecated, and truncate_pagecache and inode_newsize_ok helpers introduced
previously should be used.

simple_setattr is introduced for simple in-ram filesystems to implement
the new truncate sequence. Eventually all filesystems should be converted
to implement a setattr, and the default code in notify_change should go
away.

simple_setsize is also introduced to perform just the ATTR_SIZE portion
of simple_setattr (ie. changing i_size and trimming pagecache).

To implement the new truncate sequence:
- filesystem specific manipulations (eg freeing blocks) must be done in
  the setattr method rather than -&gt;truncate.
- vmtruncate can not be used by core code to trim blocks past i_size in
  the event of write failure after allocation, so this must be performed
  in the fs code.
- convert usage of helpers block_write_begin, nobh_write_begin,
  cont_write_begin, and *blockdev_direct_IO* to use _newtrunc postfixed
  variants. These avoid calling vmtruncate to trim blocks (see previous).
- inode_setattr should not be used. generic_setattr is a new function
  to be used to copy simple attributes into the generic inode.
- make use of the better opportunity to handle errors with the new sequence.

Big problem with the previous calling sequence: the filesystem is not called
until i_size has already changed.  This means it is not allowed to fail the
call, and also it does not know what the previous i_size was. Also, generic
code calling vmtruncate to truncate allocated blocks in case of error had
no good way to return a meaningful error (or, for example, atomically handle
block deallocation).

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>rename the generic fsync implementations</title>
<updated>2010-05-28T02:06:06Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2010-05-26T15:53:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1b061d9247f71cd15edc4c4c4600191a903642c0'/>
<id>urn:sha1:1b061d9247f71cd15edc4c4c4600191a903642c0</id>
<content type='text'>
We don't name our generic fsync implementations very well currently.
The no-op implementation for in-memory filesystems currently is called
simple_sync_file which doesn't make too much sense to start with,
the the generic one for simple filesystems is called simple_fsync
which can lead to some confusion.

This patch renames the generic file fsync method to generic_file_fsync
to match the other generic_file_* routines it is supposed to be used
with, and the no-op implementation to noop_fsync to make it obvious
what to expect.  In addition add some documentation for both methods.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>drop unused dentry argument to -&gt;fsync</title>
<updated>2010-05-28T02:05:02Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2010-05-26T15:53:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7ea8085910ef3dd4f3cad6845aaa2b580d39b115'/>
<id>urn:sha1:7ea8085910ef3dd4f3cad6845aaa2b580d39b115</id>
<content type='text'>
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>FS / libfs: Implement simple_write_to_buffer</title>
<updated>2010-05-10T21:08:17Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2010-05-01T21:51:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6a727b43be8b005609e893a80af980808012cfdb'/>
<id>urn:sha1:6a727b43be8b005609e893a80af980808012cfdb</id>
<content type='text'>
It will be used in suspend code and serves as an easy wrap around
copy_from_user. Similar to simple_read_from_buffer, it takes care
of transfers with proper lengths depending on available and count
parameters and advances ppos appropriately.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>libfs: Unexport and kill simple_prepare_write</title>
<updated>2010-03-03T18:00:17Z</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2010-01-12T14:18:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=193cf4b99113a4550598ba9e8343e591fc062e23'/>
<id>urn:sha1:193cf4b99113a4550598ba9e8343e591fc062e23</id>
<content type='text'>
Remove the EXPORT_UNUSED_SYMBOL of simple_prepare_write

Collapse simple_prepare_write into it's only caller, though
making it simpler and clearer to understand.

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>libfs: Open code simple_commit_write into only user</title>
<updated>2010-03-03T18:00:16Z</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2010-01-12T13:13:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ad2a722f196d2b014f49e6c37e072df71eb3695f'/>
<id>urn:sha1:ad2a722f196d2b014f49e6c37e072df71eb3695f</id>
<content type='text'>
* simple_commit_write was only called by simple_write_end.
  Open coding it makes it tiny bit less heavy on the arithmetic and
  much more readable.

* While at it use zero_user() for clearing a partial page.
* While at it add a docbook comment for simple_write_end.

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>libfs: move EXPORT_SYMBOL for d_alloc_name</title>
<updated>2009-12-16T17:16:48Z</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hartleys@visionengravers.com</email>
</author>
<published>2009-09-30T00:09:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ef26ca97e83052790940cbc444b01b0d17a813c1'/>
<id>urn:sha1:ef26ca97e83052790940cbc444b01b0d17a813c1</id>
<content type='text'>
The EXPORT_SYMBOL for d_alloc_name is in fs/libfs.c but the function
is in fs/dcache.c.  Move the EXPORT_SYMBOL to the line immediately
after the closing function brace line in fs/dcache.c as mentioned
in Documentation/CodingStyle.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>libfs: return error code on failed attr set</title>
<updated>2009-09-24T11:47:30Z</updated>
<author>
<name>Wu Fengguang</name>
<email>fengguang.wu@intel.com</email>
</author>
<published>2009-09-18T20:06:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=05cc0cee6948fc11985d11557fb130645a7f69a6'/>
<id>urn:sha1:05cc0cee6948fc11985d11557fb130645a7f69a6</id>
<content type='text'>
Currently all simple_attr.set handlers return 0 on success and negative
codes on error.  Fix simple_attr_write() to return these error codes.

Signed-off-by: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
