<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.linux.file-systems">
    <title>gmane.linux.file-systems</title>
    <link>http://blog.gmane.org/gmane.linux.file-systems</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74757"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74755"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74753"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74752"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74701"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74696"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74690"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74689"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74643"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74609"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74580"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74568"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74537"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74535"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74467"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74463"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74451"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74367"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74335"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.file-systems/74278"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74757">
    <title>предобро поглядеть на наш сайт. вам полюбится то что Вы на нем прочитаете.</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74757</link>
    <description>&lt;pre&gt;наипрекраснейшее предложение на сейчас  http://goo.gl/ZXVUR?/JXCbq Без подхода – никуда! 
&lt;/pre&gt;</description>
    <dc:creator>angfealmian</dc:creator>
    <dc:date>2013-05-21T21:47:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74755">
    <title>(unknown)</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74755</link>
    <description>&lt;pre&gt;

Are you financially down and in need of financial assistance to settle your bills or depth and you have know were to go,if yes ,contact us &amp;amp;nbsp;for assistance Via Email:cmothertheressa&amp;lt; at &amp;gt;yahoo.com
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Mrs. Theressa</dc:creator>
    <dc:date>2013-05-21T21:51:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74753">
    <title>(unknown)</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74753</link>
    <description>&lt;pre&gt;

Are you financially down and in need of financial assistance to settle your bills or depth and you have know were to go,if yes ,contact us &amp;amp;nbsp;for assistance Via Email:cmothertheressa&amp;lt; at &amp;gt;yahoo.com
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Mrs. Theressa</dc:creator>
    <dc:date>2013-05-21T21:32:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74752">
    <title>(unknown)</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74752</link>
    <description>&lt;pre&gt;

Are you financially down and in need of financial assistance to settle your bills or depth and you have know were to go,if yes ,contact us &amp;amp;nbsp;for assistance Via Email:cmothertheressa&amp;lt; at &amp;gt;yahoo.com
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Mrs. Theressa</dc:creator>
    <dc:date>2013-05-21T21:31:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74701">
    <title>Наизабавнейший подарок для детей</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74701</link>
    <description>&lt;pre&gt;Игрушка сконструирована ошеломлять http://goo.gl/6PBxZ?/wgLIXQb
&lt;/pre&gt;</description>
    <dc:creator>инуля</dc:creator>
    <dc:date>2013-05-20T18:15:28</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74696">
    <title>Вы можете ощутимее</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74696</link>
    <description>&lt;pre&gt;Мы преподносим вашему любопытству наиновейшую программку людям, кои направляются к своим целям! и не имеет значения, каковую задачу Вы пред собою устанавливаете – заменить кампанию, развернуть компанию али похудеть на |0 кил. Мы знаем как помочь Вам достичь успеха! она посодействует Вам «разложить целиком по полочкам» и сосредоточить внутренние резервы на наивысшем – на Вашей цели! Подробности: http://goo.gl/1eym8?/asYIZBAX Вам когда - нибудь доводилось находиться в этакой ситуации, когда Вы начинали работать, но сызнова задерживались, начинали не решаться либо - утрачивали смак. Как будто содержалось Все понятно, и замысел содержался, но с места двинуться не слаживалось. совершили заключение действовать, а не предвидели с чего начать. не ориентировались как уйти из сложной ситуации, как пересилить препятствие.
&lt;/pre&gt;</description>
    <dc:creator>венедиктушка</dc:creator>
    <dc:date>2013-05-20T12:51:28</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74690">
    <title>Скоростное изучение</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74690</link>
    <description>&lt;pre&gt;  Адрес в интернете: http://goo.gl/yhPy0 . Конкретнейшая система подачи прорабатываемого учебного материала - фокусирование на успех. Создать круг общения. Курс для делающих первые щаги и углублённых. 
 
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>дануся</dc:creator>
    <dc:date>2013-05-20T04:53:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74689">
    <title>Limit dentry cache entries</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74689</link>
    <description>&lt;pre&gt;Hello,

We have a bunch of servers that create a lot of temp files, or check
for the existence of non-existent files. Every such operation creates
a dentry object and soon most of the free memory is consumed for
'negative' dentry entries. This behavior was observed on both CentOS
kernel v.2.6.32-358 and Amazon Linux kernel v.3.4.43-4.

There are also some processes running that occasionally allocate large
chunks of memory, and when this happens the kernel clears out a bunch
of stale dentry caches. This clearing takes some time. kswapd kicks
in, and allocations and bzero() of 4GB that normally takes &amp;lt;1s, takes
20s or more.

Because the memory needs are non-continuous but negative dentry
generation is fairly continuous, vfs_cache_pressure doesn't help much.

The thought I had was to have a sysctl that limits the number of
dentries per super-block (sb-max-dentry). Everytime a new dentry is
allocated in d_alloc(), check if dentry_stat.nr_dentry exceeds (number
of super blocks * sb-max-dentry). If yes, queue up an asynchronous
workqueue call to prune_dcache(). Also have a separate sysctl to
indicate by what percentage to reduce the dentry entries when this
happens.

Thanks for your input. If this sounds like a reasonable idea, I'll
send out a patch.

Cheers,
Keyur.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Keyur Govande</dc:creator>
    <dc:date>2013-05-20T03:50:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74643">
    <title>[PATCH v7 00/34] kmemcg shrinkers</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74643</link>
    <description>&lt;pre&gt;Initial notes:
==============

Please pay attention to new patches that are debuting in this series. Patch1
changes our unused countries for int to long, since Dave noticed that it wasn't
being enough in some cases. Aside from that, the major change is that we now
compute and keep deferred work per-node (Patch13). The biggest effect of this,
is that to avoid storing a new nodemask in the stack, I am passing only the
node id down to the API. This means that the lru API *does not* take a nodemask
any longer, which in turn, makes it simpler.

I deeply considered this matter, and decided this would be the best way to go.
It is not different from what I have already done for memcgs: Only a single one
is passed down, and the complexity of scanning them is moved upwards to the
caller, where all the scanning logic should belong anyway.

If you want, you can also grab from branch "kmemcg-lru-shrinker" at:

git://git.kernel.org/pub/scm/linux/kernel/git/glommer/memcg.git

I hope the performance problems are all gone. My testing now shows a smoother
and steady state for the objects during the lifetime of the workload, and
postmark numbers are closer to base, although we do deviate a bit.

Main changes from *v6:
* Change nr_unused_dentry to long, Dave reported an int not being enough
* Fixed shrink_list leak, by Dave
* LRU API now gets a node id, instead of a node mask.
* per-node deferred work, leading to smoother behavior

Hi,

This patchset implements targeted shrinking for memcg when kmem limits are
present. So far, we've been accounting kernel objects but failing allocations
when short of memory. This is because our only option would be to call the
global shrinker, depleting objects from all caches and breaking isolation.

The main idea is to associate per-memcg lists with each of the LRUs. The main
LRU still provides a single entry point and when adding or removing an element
from the LRU, we use the page information to figure out which memcg it belongs
to and relay it to the right list.

Base work:
==========

Please note that this builds upon the recent work from Dave Chinner that
sanitizes the LRU shrinking API and make the shrinkers node aware. Node
awareness is not *strictly* needed for my work, but I still perceive it
as an advantage. The API unification is a major need, and I build upon it
heavily. That allows us to manipulate the LRUs without knowledge of the
underlying objects with ease. This time, I am including that work here as
a baseline.

Main changes from *v6:
* Change nr_unused_dentry to long, Dave reported an int not being enough
* Fixed shrink_list leak, by Dave
* LRU API now gets a node id, instead of a node mask.
* per-node deferred work, leading to smoother behavior

Main changes from *v5:
* Rebased to linux-next, and fix the conflicts with the dcache.
* Make sure LRU_RETRY only retry once
* Prevent the bcache shrinker to scan the caches when disabled (by returning
  0 in the count function)
* Fix i915 return code when mutex cannot be acquired.
* Only scan less-than-batch objects in memcg scenarios

Main changes from *v4:
* Fixed a bug in user-generated memcg pressure
* Fixed overly-agressive slab shrinker behavior spotted by Mel Gorman
* Various other fixes and comments by Mel Gorman

Main changes from *v3:
* Merged suggestions from mailing list.
* Removed the memcg-walking code from LRU. vmscan now drives all the hierarchy
  decisions, which makes more sense
* lazily free the old memcg arrays (needs now to be saved in struct lru). Since
  we need to call synchronize_rcu, calling it for every LRU can become expensive
* Moved the dead memcg shrinker to vmpressure. Already independently sent to
  linux-mm for review.
* Changed locking convention for LRU_RETRY. It now needs to return locked, which
  silents warnings about possible lock unbalance (although previous code was
  correct)

Main changes from *v2:
* shrink dead memcgs when global pressure kicks in. Uses the new lru API.
* bugfixes and comments from the mailing list.
* proper hierarchy-aware walk in shrink_slab.

Main changes from *v1:
* merged comments from the mailing list
* reworked lru-memcg API
* effective proportional shrinking
* sanitized locking on the memcg side
* bill user memory first when kmem == umem
* various bugfixes

Dave Chinner (17):
  dcache: convert dentry_stat.nr_unused to per-cpu counters
  dentry: move to per-sb LRU locks
  dcache: remove dentries from LRU before putting on dispose list
  mm: new shrinker API
  shrinker: convert superblock shrinkers to new API
  list: add a new LRU list type
  inode: convert inode lru list to generic lru list code.
  dcache: convert to use new lru list infrastructure
  list_lru: per-node list infrastructure
  shrinker: add node awareness
  fs: convert inode and dentry shrinking to be node aware
  xfs: convert buftarg LRU to generic code
  xfs: convert dquot cache lru to list_lru
  fs: convert fs shrinkers to new scan/count API
  drivers: convert shrinkers to new count/scan API
  shrinker: convert remaining shrinkers to count/scan API
  shrinker: Kill old -&amp;gt;shrink API.

Glauber Costa (17):
  fs: bump inode and dentry counters to long
  super: fix calculation of shrinkable objects for small numbers
  vmscan: per-node deferred work
  list_lru: per-node API
  i915: bail out earlier when shrinker cannot acquire mutex
  hugepage: convert huge zero page shrinker to new shrinker API
  vmscan: also shrink slab in memcg pressure
  memcg,list_lru: duplicate LRUs upon kmemcg creation
  lru: add an element to a memcg list
  list_lru: per-memcg walks
  memcg: per-memcg kmem shrinking
  memcg: scan cache objects hierarchically
  vmscan: take at least one pass with shrinkers
  super: targeted memcg reclaim
  memcg: move initialization to memcg creation
  vmpressure: in-kernel notifications
  memcg: reap dead memcgs upon global memory pressure.

 arch/x86/kvm/mmu.c                        |  28 +-
 drivers/gpu/drm/i915/i915_dma.c           |   4 +-
 drivers/gpu/drm/i915/i915_gem.c           |  71 +++--
 drivers/gpu/drm/ttm/ttm_page_alloc.c      |  48 ++--
 drivers/gpu/drm/ttm/ttm_page_alloc_dma.c  |  55 ++--
 drivers/md/bcache/btree.c                 |  43 +--
 drivers/md/bcache/sysfs.c                 |   2 +-
 drivers/md/dm-bufio.c                     |  65 +++--
 drivers/staging/android/ashmem.c          |  46 +++-
 drivers/staging/android/lowmemorykiller.c |  40 +--
 drivers/staging/zcache/zcache-main.c      |  29 +-
 fs/dcache.c                               | 259 +++++++++++-------
 fs/drop_caches.c                          |   1 +
 fs/ext4/extents_status.c                  |  30 ++-
 fs/gfs2/glock.c                           |  30 ++-
 fs/gfs2/main.c                            |   3 +-
 fs/gfs2/quota.c                           |  14 +-
 fs/gfs2/quota.h                           |   4 +-
 fs/inode.c                                | 194 ++++++--------
 fs/internal.h                             |   7 +-
 fs/mbcache.c                              |  53 ++--
 fs/nfs/dir.c                              |  20 +-
 fs/nfs/internal.h                         |   4 +-
 fs/nfs/super.c                            |   3 +-
 fs/nfsd/nfscache.c                        |  31 ++-
 fs/quota/dquot.c                          |  39 ++-
 fs/super.c                                | 104 +++++---
 fs/ubifs/shrinker.c                       |  20 +-
 fs/ubifs/super.c                          |   3 +-
 fs/ubifs/ubifs.h                          |   3 +-
 fs/xfs/xfs_buf.c                          | 170 ++++++------
 fs/xfs/xfs_buf.h                          |   5 +-
 fs/xfs/xfs_dquot.c                        |   7 +-
 fs/xfs/xfs_icache.c                       |   4 +-
 fs/xfs/xfs_icache.h                       |   2 +-
 fs/xfs/xfs_qm.c                           | 277 +++++++++----------
 fs/xfs/xfs_qm.h                           |   4 +-
 fs/xfs/xfs_super.c                        |  12 +-
 include/linux/dcache.h                    |  14 +-
 include/linux/fs.h                        |  25 +-
 include/linux/list_lru.h                  | 162 +++++++++++
 include/linux/memcontrol.h                |  45 ++++
 include/linux/shrinker.h                  |  72 ++++-
 include/linux/swap.h                      |   2 +
 include/linux/vmpressure.h                |   6 +
 include/trace/events/vmscan.h             |   4 +-
 include/uapi/linux/fs.h                   |   6 +-
 kernel/sysctl.c                           |   6 +-
 lib/Makefile                              |   2 +-
 lib/list_lru.c                            | 396 +++++++++++++++++++++++++++
 mm/huge_memory.c                          |  17 +-
 mm/memcontrol.c                           | 430 ++++++++++++++++++++++++++----
 mm/memory-failure.c                       |   2 +
 mm/slab_common.c                          |   1 -
 mm/vmpressure.c                           |  52 +++-
 mm/vmscan.c                               | 378 +++++++++++++++++++-------
 net/sunrpc/auth.c                         |  45 +++-
 57 files changed, 2438 insertions(+), 961 deletions(-)
 create mode 100644 include/linux/list_lru.h
 create mode 100644 lib/list_lru.c

&lt;/pre&gt;</description>
    <dc:creator>Glauber Costa</dc:creator>
    <dc:date>2013-05-19T20:06:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74609">
    <title>[PATCH] fs: add jfsv3 (AIX powerpc native JFS file system) support</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74609</link>
    <description>&lt;pre&gt;This is a file system driver for the file system called JFS on AIX, but
different from what's called jfs on linux.  In AIX header files this
file system seems to be called "Version 3" or "Version 3p", hence its
name here.  This driver supports only read-only access to such file systems,
and has been tested successfully on AIX 3.5, AIX 4.1 and AIX 4.2 filesystems..

Signed-off-by: Philippe De Muyter &amp;lt;phdm&amp;lt; at &amp;gt;macqel.be&amp;gt;
Tested-by: Jori Mantysalo &amp;lt;Jori.Mantysalo&amp;lt; at &amp;gt;uta.fi&amp;gt;
---
 fs/Kconfig        |    1 +
 fs/Makefile       |    1 +
 fs/jfsv3/Kconfig  |   10 +
 fs/jfsv3/Makefile |    7 +
 fs/jfsv3/inode.c  |  721 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 740 insertions(+), 0 deletions(-)
 create mode 100644 fs/jfsv3/Kconfig
 create mode 100644 fs/jfsv3/Makefile
 create mode 100644 fs/jfsv3/inode.c

diff --git a/fs/Kconfig b/fs/Kconfig
index c229f82..807823a 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -212,6 +212,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; source "fs/ufs/Kconfig"
 source "fs/exofs/Kconfig"
 source "fs/f2fs/Kconfig"
 source "fs/efivarfs/Kconfig"
+source "fs/jfsv3/Kconfig"
 
 endif # MISC_FILESYSTEMS
 
diff --git a/fs/Makefile b/fs/Makefile
index 4fe6df3..99cd8e6 100644
--- a/fs/Makefile
+++ b/fs/Makefile
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -122,6 +122,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; obj-$(CONFIG_OCFS2_FS)+= ocfs2/
 obj-$(CONFIG_BTRFS_FS)+= btrfs/
 obj-$(CONFIG_GFS2_FS)           += gfs2/
 obj-$(CONFIG_F2FS_FS)+= f2fs/
+obj-$(CONFIG_JFSV3_FS)+= jfsv3/
 obj-y+= exofs/ # Multiple modules
 obj-$(CONFIG_CEPH_FS)+= ceph/
 obj-$(CONFIG_PSTORE)+= pstore/
diff --git a/fs/jfsv3/Kconfig b/fs/jfsv3/Kconfig
new file mode 100644
index 0000000..4ba73c5
--- /dev/null
+++ b/fs/jfsv3/Kconfig
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+config JFSV3_FS
+tristate "AIX jfsv3 file system support"
+---help---
+  Read-only support for AIX jfs file systems (not to be confused
+  with linux jfs).  You should normally also select support for
+  AIX LVM partitions, but if you manage to get a AIX file system
+  image by another way (dd, e.g.), selecting this is enough.  You'll
+  be able to mount your disk image using the loop driver.
+  To compile this file system support as a module, choose M here: the
+  module will be called jfsv3.
diff --git a/fs/jfsv3/Makefile b/fs/jfsv3/Makefile
new file mode 100644
index 0000000..d6ecd66
--- /dev/null
+++ b/fs/jfsv3/Makefile
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#
+# Makefile for the AIX jfsv3 filesystem routines.
+#
+
+obj-$(CONFIG_JFSV3_FS) += jfsv3.o
+
+jfsv3-objs := inode.o
diff --git a/fs/jfsv3/inode.c b/fs/jfsv3/inode.c
new file mode 100644
index 0000000..3160f08
--- /dev/null
+++ b/fs/jfsv3/inode.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,721 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ * AIX JFS Version 3/3p file system, Linux read-only implementation
+ *
+ * Copyright (C) 2012-2013  Philippe De Muyter &amp;lt;phdm&amp;lt; at &amp;gt;macqel.be&amp;gt;
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include &amp;lt;linux/module.h&amp;gt;
+#include &amp;lt;linux/namei.h&amp;gt;
+#include &amp;lt;linux/statfs.h&amp;gt;
+#include &amp;lt;linux/buffer_head.h&amp;gt;
+#include &amp;lt;linux/mpage.h&amp;gt;
+#include &amp;lt;linux/fs.h&amp;gt;
+#include &amp;lt;linux/slab.h&amp;gt;
+
+struct  jfsv3_superblock {
+unsigned char   s_magic[4];     /* magic number */
+char   s_flag[4];      /* flag word (see below) */
+__be32 s_agsize;       /* fragments per allocation group */
+__be32 s_logserial;    /* serial number of log when fs mounted */
+__be32 s_fsize;        /* size (in 512 bytes) of entire fs */
+__be16 s_bsize;        /* block size in bytes */
+__be16 s_spare;        /* unused. */
+char   s_fname[6];     /* name of this file system */
+char   s_fpack[6];     /* name of this volume */
+__be32 s_logdev;       /* device address of log */
+
+/* current file system state information, values change over time */
+char   s_fmod;         /* flag: set when file system is mounted */
+char   s_ronly;        /* flag: file system is read only */
+__be32 s_time;         /* time of last superblock update */
+
+/* more persistent information */
+__be32 s_version;      /* version number */
+__be32 s_fragsize;     /* fragment size in bytes (fsv3p only) */
+__be32 s_iagsize;      /* disk inode per alloc grp (fsv3p only) */
+__be32 s_compress;     /* &amp;gt; 0 if data compression */
+};
+
+#define fsv3magic  "\103\041\207\145"   /* Version 3 fs magic number */
+#define fsv3pmagic "\145\207\041\103"   /* Version 3p fs magic number */
+
+#define fsv3vers   0                    /* Version 3 fs version number */
+#define fsv3pvers  1                    /* Version 3p fs version number */
+
+#define D_PRIVATE 48/* max len of in-inode symlink */
+
+struct jfsv3_dinode {
+__be32 di_gen;
+__be32 di_mode;
+__be16 di_nlink;
+__be16 di_acct;
+__be32 di_uid;
+__be32 di_gid;
+__be32 di_size;
+__be32 di_nblocks;
+__be32 di_mtime;
+char   res32[4];
+__be32 di_atime;
+char   res40[4];
+__be32 di_ctime;
+char   res48[4];
+char   res52[28];
+__be32 di_rdaddr[8];
+char   res112[4];
+__be32 di_rindirect;
+char   res120[8];
+};
+
+struct jfsv3_direct {
+        __be32  d_ino;
+        __be16  d_reclen;
+        __be16  d_namlen;
+        char    d_name[0];    /* NULL terminated      */
+};
+
+struct jfsv3_fs_info {
+unsigned long  s_iagsize;/* disk inodes per alloc grp */
+unsigned long  s_fsize;/* size of fs in 512 bytes-blocks */
+unsigned long  s_fragsize;/* basic block size */
+unsigned long  s_agsize;/* blocks per allocation group */
+};
+
+static loff_t dinode_offset(struct super_block *sb, unsigned long ino)
+{
+struct jfsv3_fs_info *fsi = sb-&amp;gt;s_fs_info;
+unsigned long iagsize = fsi-&amp;gt;s_iagsize;
+
+/* The first i-nodes are at block 256 (32 x 4096 bytes) */
+/* Next i-nodes are at block fsi-&amp;gt;s_agsize * fsi-&amp;gt;s_fragsize * n */
+if (ino &amp;lt; iagsize)
+return (256 * 512) + ino * 128;
+else
+return (loff_t)((ino / iagsize) * fsi-&amp;gt;s_agsize * (fsi-&amp;gt;s_fragsize / 128) + (ino % iagsize)) * 128;
+}
+
+struct jfsv3_dirpage {
+char *p_data;
+struct buffer_head *p_bh;
+};
+
+void jfsv3_readdirpage(struct jfsv3_dirpage *p, struct super_block *sb, u32 addr)
+{
+struct buffer_head *bh;
+
+if (sb-&amp;gt;s_blocksize == 4096) {
+bh = __bread(sb-&amp;gt;s_bdev, addr, 4096);
+p-&amp;gt;p_bh = bh;
+if (bh)
+p-&amp;gt;p_data = bh-&amp;gt;b_data;
+else
+p-&amp;gt;p_data = NULL;
+} else {
+u32 nfrags;
+char *data;
+
+nfrags = addr &amp;gt;&amp;gt; 28;
+nfrags = 8 - nfrags;
+if (nfrags * 512 == sb-&amp;gt;s_blocksize) {
+addr &amp;amp;= 0xfffffff;
+bh = __bread(sb-&amp;gt;s_bdev, addr, sb-&amp;gt;s_blocksize);
+p-&amp;gt;p_bh = bh;
+if (bh)
+p-&amp;gt;p_data = bh-&amp;gt;b_data;
+else
+p-&amp;gt;p_data = NULL;
+return;
+}
+data = kmalloc(nfrags * 512, GFP_KERNEL);
+p-&amp;gt;p_data = data;
+p-&amp;gt;p_bh = NULL;
+if (!data)
+return;
+addr &amp;amp;= 0xfffffff;
+#if 0
+printk("addr = %u, nfrags = %u\n", addr, nfrags);
+#endif
+do {
+struct buffer_head *bh;
+
+bh = __bread(sb-&amp;gt;s_bdev, addr, 512);
+if (bh) {
+#if 0
+print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET,
+16, 1, bh-&amp;gt;b_data, 512, 1);
+#endif
+memcpy(data, bh-&amp;gt;b_data, 512);
+brelse(bh);
+}
+addr += 1;
+data += 512;
+} while (--nfrags);
+}
+}
+
+void jfsv3_freedirpage(struct jfsv3_dirpage *p)
+{
+if (p-&amp;gt;p_data) {
+if (p-&amp;gt;p_bh)
+brelse(p-&amp;gt;p_bh);
+else
+kfree(p-&amp;gt;p_data);
+}
+}
+
+static int
+jfsv3_readdir(struct file *filp, void *dirent, filldir_t filldir)
+{
+int stored = 0;
+struct inode *i = file_inode(filp);
+#if 0
+printk("jfsv3_readdir(i_ino = %lu, f_pos = %llu)\n", i-&amp;gt;i_ino, filp-&amp;gt;f_pos);
+#endif
+if (filp-&amp;gt;f_pos &amp;lt; 8 * 4096) {
+    if (i-&amp;gt;i_ino) {
+struct super_block *sb = i-&amp;gt;i_sb;
+struct buffer_head *ibh;
+loff_t fs_offset;
+unsigned long blk_offset;
+
+fs_offset = dinode_offset(sb, i-&amp;gt;i_ino);
+blk_offset = fs_offset &amp;amp; (sb-&amp;gt;s_blocksize - 1);
+ibh = __bread(sb-&amp;gt;s_bdev, fs_offset &amp;gt;&amp;gt; sb-&amp;gt;s_blocksize_bits, sb-&amp;gt;s_blocksize);
+if (ibh) {
+struct jfsv3_dinode *aji;
+u32 curpage = filp-&amp;gt;f_pos / 4096;
+u32 addr;
+struct jfsv3_dirpage page;
+
+aji = (struct jfsv3_dinode *)(ibh-&amp;gt;b_data + blk_offset);
+#if 0
+printk("inode %lu : nlink = %u\n", i-&amp;gt;i_ino, be32_to_cpu(aji-&amp;gt;di_nlink));
+printk("mode = 0%o, size = %u, nblocks = %u, rdaddr[0] = %u\n",
+be32_to_cpu(aji-&amp;gt;di_mode), be32_to_cpu(aji-&amp;gt;di_size),
+be32_to_cpu(aji-&amp;gt;di_nblocks), be32_to_cpu(aji-&amp;gt;di_rdaddr[0]));
+#endif
+addr = be32_to_cpu(aji-&amp;gt;di_rdaddr[curpage]);
+jfsv3_readdirpage(&amp;amp;page, sb, addr);
+if (page.p_data) {
+struct jfsv3_direct *ajd;
+
+ajd = (struct jfsv3_direct *)(page.p_data + filp-&amp;gt;f_pos % 4096);
+while (filp-&amp;gt;f_pos &amp;lt; be32_to_cpu(aji-&amp;gt;di_size)
+&amp;amp;&amp;amp; filp-&amp;gt;f_pos / 4096 == curpage) {
+#if 0
+printk("%u %s\n", be32_to_cpu(ajd-&amp;gt;d_ino), ajd-&amp;gt;d_name);
+#endif
+if (filldir(dirent, ajd-&amp;gt;d_name, strlen(ajd-&amp;gt;d_name), filp-&amp;gt;f_pos, be32_to_cpu(ajd-&amp;gt;d_ino),
+    DT_UNKNOWN) &amp;lt; 0) {
+#if 0
+printk("jfsv3_readdir: filldir(%s, %u) failed\n", ajd-&amp;gt;d_name, be32_to_cpu(ajd-&amp;gt;d_ino));
+#endif
+break;
+}
+stored++;
+ajd = (struct jfsv3_direct *)((void*)ajd + be16_to_cpu(ajd-&amp;gt;d_reclen));
+filp-&amp;gt;f_pos = (char*)ajd - page.p_data + (filp-&amp;gt;f_pos &amp;amp; -4096);
+}
+jfsv3_freedirpage(&amp;amp;page);
+} else {
+u32 addr = be32_to_cpu(aji-&amp;gt;di_rdaddr[curpage]);
+u32 freefrags;
+
+printk("jfsv3_readdir: __bread(%08x) failed\n", addr);
+freefrags = addr &amp;gt;&amp;gt; 28;
+}
+brelse(ibh);
+}
+} else {
+/* FIXME : put jfsv3_get_block's indirect block handling
+ * in a separate function and use it here also.
+ */
+printk("jfsv3_readdir: huge dir support not yet implemented\n");
+    }
+}
+#if 0
+printk("exiting with f_pos = %llu, stored = %u\n", filp-&amp;gt;f_pos, stored);
+#endif
+return stored;
+}
+
+static const struct file_operations jfsv3_dir_operations = {
+.read= generic_read_dir,
+.readdir= jfsv3_readdir,
+};
+
+void jfsv3_map_bh(struct buffer_head *bh_result, struct super_block *sb, u32 addr, sector_t lblock)
+{
+#if 0
+printk("jfsv3_map_bh(%08x, %llu)\n", addr, lblock);
+#endif
+if (sb-&amp;gt;s_blocksize != 4096) {
+addr &amp;amp;= 0xfffffff;
+addr += lblock &amp;amp; (0xfff &amp;gt;&amp;gt; sb-&amp;gt;s_blocksize_bits);
+}
+#if 0
+printk("map_bh(%08x)\n", addr);
+#endif
+map_bh(bh_result, sb, addr);
+}
+
+int jfsv3_get_block(struct inode *i, sector_t lblock,
+  struct buffer_head *bh_result, int create)
+{
+int ret = -EIO;
+
+#if 0
+printk("jfsv3_get_block(block %08llx)\n", (unsigned long long)lblock);
+#endif
+if (i-&amp;gt;i_ino) {
+struct super_block *sb = i-&amp;gt;i_sb;
+struct buffer_head *ibh;
+loff_t fs_offset;
+unsigned long blk_offset;
+
+fs_offset = dinode_offset(sb, i-&amp;gt;i_ino);
+blk_offset = fs_offset &amp;amp; (sb-&amp;gt;s_blocksize - 1);
+ibh = __bread(sb-&amp;gt;s_bdev, fs_offset &amp;gt;&amp;gt; sb-&amp;gt;s_blocksize_bits, sb-&amp;gt;s_blocksize);
+if (ibh) {
+struct jfsv3_dinode *aji;
+u32 curpage = lblock &amp;gt;&amp;gt; (12 - sb-&amp;gt;s_blocksize_bits);
+
+aji = (struct jfsv3_dinode *)(ibh-&amp;gt;b_data + blk_offset);
+#if 0
+printk("inode %lu : nlink = %u\n", i-&amp;gt;i_ino, be32_to_cpu(aji-&amp;gt;di_nlink));
+printk("mode = 0%o, size = %u, nblocks = %u, rdaddr[0] = %u\n",
+be32_to_cpu(aji-&amp;gt;di_mode), be32_to_cpu(aji-&amp;gt;di_size),
+be32_to_cpu(aji-&amp;gt;di_nblocks), be32_to_cpu(aji-&amp;gt;di_rdaddr[0]));
+#endif
+if (curpage &amp;lt; 8) {
+jfsv3_map_bh(bh_result, sb, be32_to_cpu(aji-&amp;gt;di_rdaddr[curpage]), lblock);
+ret = 0;
+} else {
+u32 addr = be32_to_cpu(aji-&amp;gt;di_rindirect);
+u32 frags_per_page = 4096 / sb-&amp;gt;s_blocksize;
+u32 addrs_per_block = 1024 / frags_per_page;
+#if 0
+printk("r_indirect = %08x, curpage = %u\n", addr, curpage);
+#endif
+if (be32_to_cpu(aji-&amp;gt;di_size) &amp;lt;= 1024 * 4096) {
+struct buffer_head *sibh;
+
+addr += curpage / addrs_per_block;
+sibh = __bread(sb-&amp;gt;s_bdev, addr, sb-&amp;gt;s_blocksize);
+if (sibh) {
+unsigned long *b = (unsigned long *)sibh-&amp;gt;b_data;
+
+#if 0
+printk("mapping block %08x\n", be32_to_cpu(b[curpage % addrs_per_block]));
+#endif
+jfsv3_map_bh(bh_result, sb, be32_to_cpu(b[curpage % addrs_per_block]), lblock);
+ret = 0;
+brelse(sibh);
+}
+} else {
+/*
+ * 4k double-indirect block contains
+ * 512 addresses of indirect blocks,
+ * each containing 1024 block addresses.
+ */
+struct buffer_head *sibh;
+unsigned long diblock = curpage / 1024;
+unsigned long iblock = curpage % 1024;
+
+if (sb-&amp;gt;s_blocksize == 512) {
+/* 64 = 512 / 8 */
+addr += diblock / 64;
+diblock &amp;amp;= 63;
+}
+sibh = __bread(sb-&amp;gt;s_bdev, addr, sb-&amp;gt;s_blocksize);
+if (sibh) {
+unsigned long *ib = (unsigned long *)sibh-&amp;gt;b_data;
+struct buffer_head *dibh;
+
+addr = be32_to_cpu(ib[diblock * 2 + 1]);
+#if 0
+printk("reading addresses block %08x\n", addr);
+#endif
+addr += iblock / addrs_per_block;
+dibh = __bread(sb-&amp;gt;s_bdev, addr, sb-&amp;gt;s_blocksize);
+if (dibh) {
+unsigned long *b = (unsigned long *)dibh-&amp;gt;b_data;
+#if 0
+printk("mapping block %08x\n", be32_to_cpu(b[iblock % addrs_per_block]));
+#endif
+jfsv3_map_bh(bh_result, sb, be32_to_cpu(b[iblock % addrs_per_block]), lblock);
+ret = 0;
+brelse(dibh);
+}
+brelse(sibh);
+}
+}
+}
+brelse(ibh);
+}
+}
+return ret;
+}
+
+static int jfsv3_readpage(struct file *file, struct page *page)
+{
+return mpage_readpage(page, jfsv3_get_block);
+}
+
+static const struct address_space_operations jfsv3_aops = {
+.readpage = jfsv3_readpage
+};
+
+static struct inode *jfsv3_iget(struct super_block *sb, ino_t ino);
+
+static struct dentry *
+jfsv3_lookup(struct inode *i, struct dentry *dentry, unsigned int flags)
+{
+int res = -EACCES;
+const char *name = dentry-&amp;gt;d_name.name;
+int len = dentry-&amp;gt;d_name.len;
+struct inode *inode = NULL;
+
+#if 0
+printk("jfsv3_lookup(i_ino = %lu, %.*s)\n", i-&amp;gt;i_ino, len, name);
+#endif
+if (i-&amp;gt;i_ino) {
+struct super_block *sb = i-&amp;gt;i_sb;
+struct buffer_head *ibh;
+loff_t fs_offset;
+unsigned long blk_offset;
+
+fs_offset = dinode_offset(sb, i-&amp;gt;i_ino);
+blk_offset = fs_offset &amp;amp; (sb-&amp;gt;s_blocksize - 1);
+ibh = __bread(sb-&amp;gt;s_bdev, fs_offset &amp;gt;&amp;gt; sb-&amp;gt;s_blocksize_bits, sb-&amp;gt;s_blocksize);
+if (ibh) {
+struct jfsv3_dinode *aji;
+int curpage = 0;
+u32 addr;
+struct jfsv3_dirpage page;
+
+aji = (struct jfsv3_dinode *)(ibh-&amp;gt;b_data + blk_offset);
+#if 0
+printk("inode %lu : nlink = %u\n", i-&amp;gt;i_ino, be32_to_cpu(aji-&amp;gt;di_nlink));
+printk("mode = 0%o, size = %u, nblocks = %u, rdaddr[0] = %u\n",
+be32_to_cpu(aji-&amp;gt;di_mode), be32_to_cpu(aji-&amp;gt;di_size),
+be32_to_cpu(aji-&amp;gt;di_nblocks), be32_to_cpu(aji-&amp;gt;di_rdaddr[0]));
+#endif
+nextpage:
+addr = be32_to_cpu(aji-&amp;gt;di_rdaddr[curpage]);
+jfsv3_readdirpage(&amp;amp;page, sb, addr);
+if (page.p_data) {
+struct jfsv3_direct *ajd;
+
+ajd = (struct jfsv3_direct *)page.p_data;
+while ((char*)ajd - page.p_data &amp;lt; 4096
+&amp;amp;&amp;amp; (char*)ajd - page.p_data + curpage * 4096 &amp;lt; be32_to_cpu(aji-&amp;gt;di_size)) {
+#if 0
+printk("%u %s\n", be32_to_cpu(ajd-&amp;gt;d_ino), ajd-&amp;gt;d_name);
+#endif
+if (len == strlen(ajd-&amp;gt;d_name)
+&amp;amp;&amp;amp; memcmp(ajd-&amp;gt;d_name, name, len) == 0) {
+inode = jfsv3_iget(i-&amp;gt;i_sb, be32_to_cpu(ajd-&amp;gt;d_ino));
+res = 0;
+break;
+}
+ajd = (struct jfsv3_direct *)((void*)ajd + be16_to_cpu(ajd-&amp;gt;d_reclen));
+}
+jfsv3_freedirpage(&amp;amp;page);
+}
+curpage += 1;
+if (res &amp;amp;&amp;amp; curpage * 4096 &amp;lt; be32_to_cpu(aji-&amp;gt;di_size) &amp;amp;&amp;amp; curpage &amp;lt; 8)
+goto nextpage;
+brelse(ibh);
+}
+}
+d_add(dentry, inode);
+if (res)
+printk("jfsv3_lookup(i_ino = %lu, %.*s) failed\n", i-&amp;gt;i_ino, len, name);
+return ERR_PTR(res);
+}
+
+static const struct inode_operations jfsv3_dir_inode_operations = {
+.lookup= jfsv3_lookup,
+};
+
+static void *jfsv3_follow_link(struct dentry *dentry, struct nameidata *nd)
+{
+struct inode *i = dentry-&amp;gt;d_inode;
+char *target_path = NULL;
+
+if (i-&amp;gt;i_ino) {
+struct super_block *sb = i-&amp;gt;i_sb;
+struct buffer_head *ibh;
+loff_t fs_offset;
+unsigned long blk_offset;
+
+fs_offset = dinode_offset(sb, i-&amp;gt;i_ino);
+blk_offset = fs_offset &amp;amp; (sb-&amp;gt;s_blocksize - 1);
+ibh = __bread(sb-&amp;gt;s_bdev, fs_offset &amp;gt;&amp;gt; sb-&amp;gt;s_blocksize_bits, sb-&amp;gt;s_blocksize);
+if (ibh) {
+struct jfsv3_dinode *aji;
+
+aji = (struct jfsv3_dinode *)(ibh-&amp;gt;b_data + blk_offset);
+target_path = kmalloc(D_PRIVATE + 1, GFP_KERNEL);
+if (target_path) {
+memcpy(target_path, (char *)aji-&amp;gt;di_rdaddr, D_PRIVATE);
+target_path[D_PRIVATE] = '\0';
+}
+nd_set_link(nd, target_path);
+brelse(ibh);
+}
+}
+return target_path;
+}
+
+static void jfsv3_put_link(struct dentry *dentry, struct nameidata *nd, void *target_path)
+{
+if (target_path)
+kfree(target_path);
+}
+
+const struct inode_operations jfsv3_symlink_inode_operations = {
+.readlink= generic_readlink,
+.follow_link= jfsv3_follow_link,
+.put_link= jfsv3_put_link,
+};
+
+static void
+jfsv3_read_inode(struct inode *i)
+{
+#if 0
+printk("jfsv3_read_inode(%lu)\n", i-&amp;gt;i_ino);
+#endif
+if (i-&amp;gt;i_ino) {
+struct super_block *sb = i-&amp;gt;i_sb;
+struct buffer_head *ibh;
+loff_t fs_offset;
+unsigned long blk_offset;
+
+fs_offset = dinode_offset(sb, i-&amp;gt;i_ino);
+blk_offset = fs_offset &amp;amp; (sb-&amp;gt;s_blocksize - 1);
+ibh = __bread(sb-&amp;gt;s_bdev, fs_offset &amp;gt;&amp;gt; sb-&amp;gt;s_blocksize_bits, sb-&amp;gt;s_blocksize);
+if (!ibh) {
+printk("__bread(%llu, %lu) = NULL\n", fs_offset &amp;gt;&amp;gt; sb-&amp;gt;s_blocksize_bits, sb-&amp;gt;s_blocksize);
+} else {
+struct jfsv3_dinode *aji;
+
+aji = (struct jfsv3_dinode *)(ibh-&amp;gt;b_data + blk_offset);
+#if 0
+printk("inode %lu : nlink = %u\n", i-&amp;gt;i_ino, be32_to_cpu(aji-&amp;gt;di_nlink));
+printk("mode = 0%o, size = %u, nblocks = %u, rdaddr[0] = %u\n",
+be32_to_cpu(aji-&amp;gt;di_mode), be32_to_cpu(aji-&amp;gt;di_size),
+be32_to_cpu(aji-&amp;gt;di_nblocks), be32_to_cpu(aji-&amp;gt;di_rdaddr[0]));
+#endif
+set_nlink(i, be32_to_cpu(aji-&amp;gt;di_nlink));
+i-&amp;gt;i_mode = be32_to_cpu(aji-&amp;gt;di_mode);
+i-&amp;gt;i_size = be32_to_cpu(aji-&amp;gt;di_size);
+i-&amp;gt;i_blocks = ((i-&amp;gt;i_size + sb-&amp;gt;s_blocksize - 1) &amp;gt;&amp;gt; sb-&amp;gt;s_blocksize_bits) &amp;lt;&amp;lt; (sb-&amp;gt;s_blocksize_bits - 9);
+i-&amp;gt;i_uid = be32_to_cpu(aji-&amp;gt;di_uid);
+i-&amp;gt;i_gid = be32_to_cpu(aji-&amp;gt;di_gid);
+i-&amp;gt;i_mtime.tv_sec = be32_to_cpu(aji-&amp;gt;di_mtime);
+i-&amp;gt;i_atime.tv_sec = be32_to_cpu(aji-&amp;gt;di_atime);
+i-&amp;gt;i_ctime.tv_sec = be32_to_cpu(aji-&amp;gt;di_ctime);
+i-&amp;gt;i_mtime.tv_nsec = i-&amp;gt;i_atime.tv_nsec = i-&amp;gt;i_ctime.tv_nsec = 0;
+if (S_ISREG(i-&amp;gt;i_mode)) {
+i-&amp;gt;i_fop = &amp;amp;generic_ro_fops;
+i-&amp;gt;i_data.a_ops = &amp;amp;jfsv3_aops;
+} else if (S_ISDIR(i-&amp;gt;i_mode)) {
+i-&amp;gt;i_op = &amp;amp;jfsv3_dir_inode_operations;
+i-&amp;gt;i_fop = &amp;amp;jfsv3_dir_operations;
+} else if (S_ISLNK(i-&amp;gt;i_mode)) {
+if (i-&amp;gt;i_size &amp;gt; D_PRIVATE) {
+i-&amp;gt;i_op = &amp;amp;page_symlink_inode_operations;
+i-&amp;gt;i_data.a_ops = &amp;amp;jfsv3_aops;
+} else
+i-&amp;gt;i_op = &amp;amp;jfsv3_symlink_inode_operations;
+} else {
+if (!S_ISCHR(i-&amp;gt;i_mode)
+&amp;amp;&amp;amp; !S_ISBLK(i-&amp;gt;i_mode)
+&amp;amp;&amp;amp; !S_ISFIFO(i-&amp;gt;i_mode)
+&amp;amp;&amp;amp; !S_ISSOCK(i-&amp;gt;i_mode)) {
+printk("inode %lu : fs_offset = %lld, blk_offset = %lu\n",
+i-&amp;gt;i_ino, fs_offset, blk_offset);
+printk("nlink = %u, mode = 0%o, size = %u, nblocks = %u, rdaddr[0] = %u\n",
+be32_to_cpu(aji-&amp;gt;di_nlink),
+be32_to_cpu(aji-&amp;gt;di_mode),
+be32_to_cpu(aji-&amp;gt;di_size),
+be32_to_cpu(aji-&amp;gt;di_nblocks),
+be32_to_cpu(aji-&amp;gt;di_rdaddr[0]));
+}
+i-&amp;gt;i_rdev = be32_to_cpu(aji-&amp;gt;di_rdaddr[0]);
+init_special_inode(i, i-&amp;gt;i_mode, i-&amp;gt;i_rdev);
+}
+brelse(ibh);
+}
+}
+}
+
+static struct inode *jfsv3_iget(struct super_block *sb, ino_t ino)
+{
+struct inode *inode;
+
+inode = iget_locked(sb, ino);
+if (!inode)
+return ERR_PTR(-ENOMEM);
+if (inode-&amp;gt;i_state &amp;amp; I_NEW) {
+jfsv3_read_inode(inode);
+unlock_new_inode(inode);
+}
+return inode;
+}
+
+static void jfsv3_put_super(struct super_block *sb)
+{
+kfree(sb-&amp;gt;s_fs_info);
+sb-&amp;gt;s_fs_info = NULL;
+}
+
+static int
+jfsv3_statfs(struct dentry *dentry, struct kstatfs *buf)
+{
+struct jfsv3_fs_info *fsi = dentry-&amp;gt;d_sb-&amp;gt;s_fs_info;
+
+buf-&amp;gt;f_type = 0x65872143;
+buf-&amp;gt;f_bsize = 4096;
+buf-&amp;gt;f_bfree = buf-&amp;gt;f_bavail = buf-&amp;gt;f_ffree;
+buf-&amp;gt;f_blocks = fsi-&amp;gt;s_fsize;
+buf-&amp;gt;f_namelen = 256;
+return 0;
+}
+
+static int jfsv3_remount(struct super_block *sb, int *flags, char *data)
+{
+*flags |= MS_RDONLY;
+return 0;
+}
+
+static const struct super_operations jfsv3_ops = {
+.put_super= jfsv3_put_super,
+.statfs= jfsv3_statfs,
+.remount_fs= jfsv3_remount,
+};
+
+static int jfsv3_fill_super(struct super_block *sb, void *data, int silent)
+{
+struct buffer_head *bh;
+struct jfsv3_superblock *aj_sb;
+struct inode *root;
+enum jfsv3type { NOTJFSV3, JFSV3, JFSV3P1, JFSV3P2 };
+enum jfsv3type fstype = NOTJFSV3;
+
+/* I would parse the options here, but there are none.. :) */
+
+sb_set_blocksize(sb, 4096);
+
+bh = __bread(sb-&amp;gt;s_bdev, 0x1000 &amp;gt;&amp;gt; sb-&amp;gt;s_blocksize_bits, sb-&amp;gt;s_blocksize);
+if (!bh)
+return -EINVAL;
+
+aj_sb = (struct jfsv3_superblock *)bh-&amp;gt;b_data;
+if (strncmp(aj_sb-&amp;gt;s_magic, "\x43\x21\x87\x65", 4) == 0)
+fstype = JFSV3;
+else if (strncmp(aj_sb-&amp;gt;s_magic, "\x65\x87\x21\x43", 4) == 0) {
+if (aj_sb-&amp;gt;s_version == cpu_to_be32(1))
+fstype = JFSV3P1;
+else if (aj_sb-&amp;gt;s_version == cpu_to_be32(2))
+fstype = JFSV3P2;
+}
+if (fstype != NOTJFSV3) {
+struct jfsv3_fs_info *fsi;
+
+sb-&amp;gt;s_magic = 0x65872143;
+fsi = kmalloc(sizeof(struct jfsv3_fs_info), GFP_KERNEL);
+fsi-&amp;gt;s_iagsize = fstype == JFSV3 ? 2048 : be32_to_cpu(aj_sb-&amp;gt;s_iagsize);
+fsi-&amp;gt;s_fsize = be32_to_cpu(aj_sb-&amp;gt;s_fsize);
+sb-&amp;gt;s_fs_info = fsi;
+printk("AIX jfs file system, lv %.6s, name %.6s, %s version %u\n",
+aj_sb-&amp;gt;s_fpack, aj_sb-&amp;gt;s_fname,
+fstype == JFSV3 ? "jfsv3" : "jfsv3p",
+be32_to_cpu(aj_sb-&amp;gt;s_version));
+printk("fs size : %lu 512 bytes blocks, block size : %u bytes\n",
+fsi-&amp;gt;s_fsize, be16_to_cpu(aj_sb-&amp;gt;s_bsize));
+printk("state : %u\n", aj_sb-&amp;gt;s_fmod);
+fsi-&amp;gt;s_agsize = be32_to_cpu(aj_sb-&amp;gt;s_agsize);
+printk("fragments per allocation group : %lu\n", fsi-&amp;gt;s_agsize);
+printk("disk i-nodes per allocation group : %lu\n", fsi-&amp;gt;s_iagsize);
+fsi-&amp;gt;s_fragsize = be32_to_cpu(aj_sb-&amp;gt;s_fragsize);
+brelse(bh);
+printk("fragments size (default 4096) : %lu bytes\n", fsi-&amp;gt;s_fragsize);
+if (!fsi-&amp;gt;s_fragsize)
+fsi-&amp;gt;s_fragsize = 4096;
+else if (sb_set_blocksize(sb, fsi-&amp;gt;s_fragsize) != fsi-&amp;gt;s_fragsize)
+goto out;
+} else {
+printk("found s_magic : %x %x %x %x\n",
+aj_sb-&amp;gt;s_magic[0], aj_sb-&amp;gt;s_magic[1],
+aj_sb-&amp;gt;s_magic[2], aj_sb-&amp;gt;s_magic[3]);
+brelse(bh);
+goto out;
+}
+
+sb-&amp;gt;s_maxbytes = 0xFFFFFFFF;
+
+sb-&amp;gt;s_flags |= MS_RDONLY;
+
+sb-&amp;gt;s_op = &amp;amp;jfsv3_ops;
+root = jfsv3_iget(sb, 2);
+if (!root)
+goto out;
+
+sb-&amp;gt;s_root = d_make_root(root);
+if (!sb-&amp;gt;s_root)
+goto out;
+
+return 0;
+
+out:
+return -EINVAL;
+}
+
+static struct dentry *jfsv3_mount(struct file_system_type *fs_type,
+int flags, const char *dev_name, void *data)
+{
+return mount_bdev(fs_type, flags, dev_name, data, jfsv3_fill_super);
+}
+
+static struct file_system_type jfsv3_fs_type = {
+.owner= THIS_MODULE,
+.name= "jfsv3",
+.mount= jfsv3_mount,
+.kill_sb= kill_block_super,
+.fs_flags= FS_REQUIRES_DEV,
+};
+MODULE_ALIAS_FS("jfsv3");
+
+static int __init init_jfsv3_fs(void)
+{
+int err;
+        err = register_filesystem(&amp;amp;jfsv3_fs_type);
+if (err)
+goto out;
+return 0;
+out:
+return err;
+}
+
+static void __exit exit_jfsv3_fs(void)
+{
+unregister_filesystem(&amp;amp;jfsv3_fs_type);
+/*
+ * Make sure all delayed rcu free inodes are flushed before we
+ * destroy cache.
+ */
+rcu_barrier();
+}
+
+/* Yes, works even as a module... :) */
+
+module_init(init_jfsv3_fs)
+module_exit(exit_jfsv3_fs)
+MODULE_LICENSE("GPL");
&lt;/pre&gt;</description>
    <dc:creator>Philippe De Muyter</dc:creator>
    <dc:date>2013-05-16T23:46:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74580">
    <title>[PATCH] cachefiles: remove unused macro list_to_page()</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74580</link>
    <description>&lt;pre&gt;Signed-off-by: Haicheng Li &amp;lt;haicheng.li&amp;lt; at &amp;gt;linux.intel.com&amp;gt;
---
 fs/cachefiles/interface.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/cachefiles/interface.c b/fs/cachefiles/interface.c
index 746ce53..847ba6a 100644
--- a/fs/cachefiles/interface.c
+++ b/fs/cachefiles/interface.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -13,8 +13,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;linux/mount.h&amp;gt;
 #include "internal.h"
 
-#define list_to_page(head) (list_entry((head)-&amp;gt;prev, struct page, lru))
-
 struct cachefiles_lookup_data {
 struct cachefiles_xattr*auxdata;/* auxiliary data */
 char*key;/* key path */
&lt;/pre&gt;</description>
    <dc:creator>Haicheng Li</dc:creator>
    <dc:date>2013-05-16T01:25:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74568">
    <title>[OT] which software project for a aix disk partition scanner for linux</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74568</link>
    <description>&lt;pre&gt;Hi,

After having looked after a AIX LVM logical volume discovery tool and a
AIX JFS file system driver for linux, I have written both myself (for
read-only access only). I plan to submit the jfs driver (which I currently
have called jfsv3) to linux-fsdevel, but the partition scanner does not fit well
in block/partitions, which supports only contiguous partitions. Similarly
kpartx (part of multipath-tools) does seem to have the same limitations
as block/partitions.

I am currently able to produce a table for input of dmsetup, but dmsetup
is a generic tool that does not support any particular partition layout.

I would like to get some suggestions of existing software projects where
my code would fit well.

Thanks in advance

Philippe

&lt;/pre&gt;</description>
    <dc:creator>Philippe De Muyter</dc:creator>
    <dc:date>2013-05-15T19:48:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74537">
    <title>[PATCH v3] nilfs2: implement calculation of free inodes count</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74537</link>
    <description>&lt;pre&gt;Hi Ryusuke,

This is third version of the patch.

v2-&amp;gt;v3
 * Trivial BUG_ON checks were removed.
 * Whole calculation algorithm was moved into
   nilfs_palloc_count_max_entries() method.
 * Improve error processing in the code.
 * The nilfs_palloc_mdt_file_can_grow() method was simplified.
 * The nilfs_ifile_count_free_inodes() method was simplified.

v1-&amp;gt;v2
 * Change __statfs_word on u64 type.
 * Rename nilfs_count_free_inodes() into nilfs_ifile_count_free_inodes()
   method.
 * Introduce auxiliary functions: nilfs_palloc_count_max_entries(),
   nilfs_palloc_count_desc_blocks(), nilfs_palloc_mdt_file_can_grow().
 * Rework processing of returned error from nilfs_ifile_count_free_inodes()
   in nilfs_statfs().

With the best regards,
Vyacheslav Dubeyko.
---
From: Vyacheslav Dubeyko &amp;lt;slava&amp;lt; at &amp;gt;dubeyko.com&amp;gt;
Subject: [PATCH v3] nilfs2: implement calculation of free inodes count

Currently, NILFS2 returns 0 as free inodes count (f_ffree) and
current used inodes count as total file nodes in file system
(f_files):

df -i
Filesystem      Inodes  IUsed   IFree IUse% Mounted on
/dev/loop0           2      2       0  100% /mnt/nilfs2

This patch implements real calculation of free inodes count.
First of all, it is calculated total file nodes in file system
as (desc_blocks_count * groups_per_desc_block * entries_per_group).
Then, it is calculated free inodes count as difference the total
file nodes and used inodes count. As a result, we have such output
for NILFS2:

df -i
Filesystem       Inodes   IUsed    IFree IUse% Mounted on
/dev/loop0      4194304 2114701  2079603   51% /mnt/nilfs2

Reported-by: Clemens Eisserer &amp;lt;linuxhippy&amp;lt; at &amp;gt;gmail.com&amp;gt;
Signed-off-by: Vyacheslav Dubeyko &amp;lt;slava&amp;lt; at &amp;gt;dubeyko.com&amp;gt;
CC: Ryusuke Konishi &amp;lt;konishi.ryusuke&amp;lt; at &amp;gt;lab.ntt.co.jp&amp;gt;
Tested-by: Vyacheslav Dubeyko &amp;lt;slava&amp;lt; at &amp;gt;dubeyko.com&amp;gt;
---
 fs/nilfs2/alloc.c |   96 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 fs/nilfs2/alloc.h |    2 ++
 fs/nilfs2/ifile.c |   22 ++++++++++++
 fs/nilfs2/ifile.h |    2 +-
 fs/nilfs2/mdt.h   |    2 ++
 fs/nilfs2/super.c |   24 ++++++++++++--
 6 files changed, 145 insertions(+), 3 deletions(-)

diff --git a/fs/nilfs2/alloc.c b/fs/nilfs2/alloc.c
index eed4d7b..2727713 100644
--- a/fs/nilfs2/alloc.c
+++ b/fs/nilfs2/alloc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -80,6 +80,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int nilfs_palloc_init_blockgroup(struct inode *inode, unsigned entry_size)
 mi-&amp;gt;mi_blocks_per_group + 1;
 /* Number of blocks per descriptor including the
    descriptor block */
+atomic_set(&amp;amp;mi-&amp;gt;mi_desc_blocks_count, 1);
+/*
+ * The field mi_desc_blocks_count is used for
+ * storing knowledge about current count of
+ * desciptor blocks. Initially, it is initialized
+ * by one.
+ */
 return 0;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -398,6 +405,95 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; nilfs_palloc_rest_groups_in_desc_block(const struct inode *inode,
 }
 
 /**
+ * nilfs_palloc_count_desc_blocks - count descriptor blocks number
+ * &amp;lt; at &amp;gt;inode: inode of metadata file using this allocator
+ * &amp;lt; at &amp;gt;start_desc_blks: known current descriptor blocks count
+ * &amp;lt; at &amp;gt;desc_blocksp: calculated descriptor blocks number [out]
+ */
+static int nilfs_palloc_count_desc_blocks(struct inode *inode,
+    unsigned int start_desc_blks,
+    unsigned int *desc_blocksp)
+{
+unsigned long ngroups = nilfs_palloc_groups_count(inode);
+unsigned long groups_per_desc_block =
+nilfs_palloc_groups_per_desc_block(inode);
+struct buffer_head *desc_bh;
+unsigned long group =
+groups_per_desc_block * (unsigned long)start_desc_blks;
+unsigned int desc_blocks;
+int err;
+
+*desc_blocksp = desc_blocks = start_desc_blks;
+for (; group &amp;lt; ngroups; group += groups_per_desc_block) {
+err = nilfs_palloc_get_desc_block(inode, group, 0, &amp;amp;desc_bh);
+if (err) {
+if (err == -ENOENT)
+break;
+return err;
+}
+desc_blocks++;
+brelse(desc_bh);
+}
+
+*desc_blocksp = desc_blocks;
+return 0;
+}
+
+/**
+ * nilfs_palloc_mdt_file_can_grow - check potential opportunity for
+ *MDT file growing
+ * &amp;lt; at &amp;gt;inode: inode of metadata file using this allocator
+ * &amp;lt; at &amp;gt;desc_blocks: known current descriptor blocks count
+ */
+static inline bool nilfs_palloc_mdt_file_can_grow(struct inode *inode,
+    unsigned int desc_blocks)
+{
+return (nilfs_palloc_groups_per_desc_block(inode) * (u64)desc_blocks) &amp;lt;
+nilfs_palloc_groups_count(inode);
+}
+
+/**
+ * nilfs_palloc_count_max_entries - count max number of entries that can be
+ *described by descriptor blocks count
+ * &amp;lt; at &amp;gt;inode: inode of metadata file using this allocator
+ * &amp;lt; at &amp;gt;nused: current number of used entries
+ * &amp;lt; at &amp;gt;nmaxp: max number of entries [out]
+ */
+int nilfs_palloc_count_max_entries(struct inode *inode, u64 nused, u64 *nmaxp)
+{
+unsigned int desc_blocks;
+u64 entries_per_desc_block, nmax;
+int err;
+
+desc_blocks = atomic_read(&amp;amp;NILFS_MDT(inode)-&amp;gt;mi_desc_blocks_count);
+entries_per_desc_block = (u64)nilfs_palloc_entries_per_group(inode) *
+nilfs_palloc_groups_per_desc_block(inode);
+
+nmax = entries_per_desc_block * (u64)desc_blocks;
+if (nused &amp;gt;= nmax) {
+err = nilfs_palloc_count_desc_blocks(inode, desc_blocks,
+&amp;amp;desc_blocks);
+if (unlikely(err))
+return err;
+
+nmax = entries_per_desc_block * (u64)desc_blocks;
+if (nused == nmax &amp;amp;&amp;amp;
+nilfs_palloc_mdt_file_can_grow(inode,
+desc_blocks)) {
+nmax += entries_per_desc_block;
+++desc_blocks;
+}
+atomic_set(&amp;amp;NILFS_MDT(inode)-&amp;gt;mi_desc_blocks_count,
+desc_blocks);
+
+if (nused &amp;gt; nmax)
+return -ERANGE;
+}
+*nmaxp = nmax;
+return 0;
+}
+
+/**
  * nilfs_palloc_prepare_alloc_entry - prepare to allocate a persistent object
  * &amp;lt; at &amp;gt;inode: inode of metadata file using this allocator
  * &amp;lt; at &amp;gt;req: nilfs_palloc_req structure exchanged for the allocation
diff --git a/fs/nilfs2/alloc.h b/fs/nilfs2/alloc.h
index fb72381..4bd6451 100644
--- a/fs/nilfs2/alloc.h
+++ b/fs/nilfs2/alloc.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -48,6 +48,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int nilfs_palloc_get_entry_block(struct inode *, __u64, int,
 void *nilfs_palloc_block_get_entry(const struct inode *, __u64,
    const struct buffer_head *, void *);
 
+int nilfs_palloc_count_max_entries(struct inode *, u64, u64 *);
+
 /**
  * nilfs_palloc_req - persistent allocator request and reply
  * &amp;lt; at &amp;gt;pr_entry_nr: entry number (vblocknr or inode number)
diff --git a/fs/nilfs2/ifile.c b/fs/nilfs2/ifile.c
index d8e65bd..d788a59 100644
--- a/fs/nilfs2/ifile.c
+++ b/fs/nilfs2/ifile.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -160,6 +160,28 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int nilfs_ifile_get_inode_block(struct inode *ifile, ino_t ino,
 }
 
 /**
+ * nilfs_ifile_count_free_inodes - calculate free inodes count
+ * &amp;lt; at &amp;gt;ifile: ifile inode
+ * &amp;lt; at &amp;gt;nmaxinodes: current maximum of available inodes count [out]
+ * &amp;lt; at &amp;gt;nfreeinodes: free inodes count [out]
+ */
+int nilfs_ifile_count_free_inodes(struct inode *ifile,
+    u64 *nmaxinodes, u64 *nfreeinodes)
+{
+u64 nused;
+int err;
+
+*nmaxinodes = 0;
+*nfreeinodes = 0;
+
+nused = atomic_read(&amp;amp;NILFS_I(ifile)-&amp;gt;i_root-&amp;gt;inodes_count);
+err = nilfs_palloc_count_max_entries(ifile, nused, nmaxinodes);
+if (likely(!err))
+*nfreeinodes = *nmaxinodes - nused;
+return err;
+}
+
+/**
  * nilfs_ifile_read - read or get ifile inode
  * &amp;lt; at &amp;gt;sb: super block instance
  * &amp;lt; at &amp;gt;root: root object
diff --git a/fs/nilfs2/ifile.h b/fs/nilfs2/ifile.h
index 59b6f2b..e9ceb27 100644
--- a/fs/nilfs2/ifile.h
+++ b/fs/nilfs2/ifile.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -48,7 +48,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline void nilfs_ifile_unmap_inode(struct inode *ifile, ino_t ino,
 int nilfs_ifile_create_inode(struct inode *, ino_t *, struct buffer_head **);
 int nilfs_ifile_delete_inode(struct inode *, ino_t);
 int nilfs_ifile_get_inode_block(struct inode *, ino_t, struct buffer_head **);
-
+int nilfs_ifile_count_free_inodes(struct inode *, u64 *, u64 *);
 int nilfs_ifile_read(struct super_block *sb, struct nilfs_root *root,
      size_t inode_size, struct nilfs_inode *raw_inode,
      struct inode **inodep);
diff --git a/fs/nilfs2/mdt.h b/fs/nilfs2/mdt.h
index ab172e8..c01b6fb 100644
--- a/fs/nilfs2/mdt.h
+++ b/fs/nilfs2/mdt.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -53,6 +53,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct nilfs_shadow_map {
  * &amp;lt; at &amp;gt;mi_shadow: shadow of bmap and page caches
  * &amp;lt; at &amp;gt;mi_blocks_per_group: number of blocks in a group
  * &amp;lt; at &amp;gt;mi_blocks_per_desc_block: number of blocks per descriptor block
+ * &amp;lt; at &amp;gt;mi_desc_blocks_count: number of descriptor blocks
  */
 struct nilfs_mdt_info {
 struct rw_semaphoremi_sem;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -64,6 +65,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct nilfs_mdt_info {
 struct nilfs_shadow_map *mi_shadow;
 unsigned longmi_blocks_per_group;
 unsigned longmi_blocks_per_desc_block;
+atomic_tmi_desc_blocks_count;
 };
 
 static inline struct nilfs_mdt_info *NILFS_MDT(const struct inode *inode)
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index c7d1f9f..2b908a6 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -609,6 +609,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int nilfs_statfs(struct dentry *dentry, struct kstatfs *buf)
 unsigned long overhead;
 unsigned long nrsvblocks;
 sector_t nfreeblocks;
+u64 nmaxinodes, nfreeinodes;
 int err;
 
 /*
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -633,14 +634,33 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int nilfs_statfs(struct dentry *dentry, struct kstatfs *buf)
 if (unlikely(err))
 return err;
 
+err = nilfs_ifile_count_free_inodes(root-&amp;gt;ifile,
+&amp;amp;nmaxinodes, &amp;amp;nfreeinodes);
+if (unlikely(err)) {
+printk(KERN_WARNING
+"NILFS warning: fail to count free inodes: err %d.\n",
+err);
+if (err == -ERANGE) {
+/*
+ * If nilfs_palloc_count_max_entries() returns
+ * -ERANGE error code then we simply treat
+ * curent inodes count as maximum possible and
+ * zero as free inodes value.
+ */
+nmaxinodes = atomic_read(&amp;amp;root-&amp;gt;inodes_count);
+nfreeinodes = 0;
+} else
+return err;
+}
+
 buf-&amp;gt;f_type = NILFS_SUPER_MAGIC;
 buf-&amp;gt;f_bsize = sb-&amp;gt;s_blocksize;
 buf-&amp;gt;f_blocks = blocks - overhead;
 buf-&amp;gt;f_bfree = nfreeblocks;
 buf-&amp;gt;f_bavail = (buf-&amp;gt;f_bfree &amp;gt;= nrsvblocks) ?
 (buf-&amp;gt;f_bfree - nrsvblocks) : 0;
-buf-&amp;gt;f_files = atomic_read(&amp;amp;root-&amp;gt;inodes_count);
-buf-&amp;gt;f_ffree = 0; /* nilfs_count_free_inodes(sb); */
+buf-&amp;gt;f_files = nmaxinodes;
+buf-&amp;gt;f_ffree = nfreeinodes;
 buf-&amp;gt;f_namelen = NILFS_NAME_LEN;
 buf-&amp;gt;f_fsid.val[0] = (u32)id;
 buf-&amp;gt;f_fsid.val[1] = (u32)(id &amp;gt;&amp;gt; 32);
&lt;/pre&gt;</description>
    <dc:creator>Vyacheslav Dubeyko</dc:creator>
    <dc:date>2013-05-15T13:32:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74535">
    <title>Bit-level consistency between two ext3 filesystems</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74535</link>
    <description>&lt;pre&gt;Hello,

I am working on improving the resiliency of a storage system using ext3.

I will maintain two ext3 partitions of identical size on two different machines.
If each partition stores the same files, what are the sources of
bit-level inconsistencies between the two partitions?  Is there any
nondeterminism?

For example, between two otherwise identical partitions, the HTREE
hash seeds are different in the superblock. How might this impact the
downstream bits in the partitions?

You can assume that all files will be saved in the same order, and all
timestamps and stat output are identical between files.

Thank you for your time,
Eitan
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Eitan Rosenfeld</dc:creator>
    <dc:date>2013-05-15T11:50:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74467">
    <title>[PATCH][Trivial] f2fs: Use list_for_each_entry rather than  list_for_each_entry_safe.</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74467</link>
    <description>&lt;pre&gt;Signed-off-by: Jianpeng Ma &amp;lt;majianpeng&amp;lt; at &amp;gt;gmail.com&amp;gt;
---
 fs/f2fs/debug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index 8d99437..0d6c6aa 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -175,12 +175,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; get_cache:
 
 static int stat_show(struct seq_file *s, void *v)
 {
-    struct f2fs_stat_info *si, *next;
+    struct f2fs_stat_info *si;
     int i = 0;
     int j;
 
     mutex_lock(&amp;amp;f2fs_stat_mutex);
-    list_for_each_entry_safe(si, next, &amp;amp;f2fs_stat_list, stat_list) {
+    list_for_each_entry(si, &amp;amp;f2fs_stat_list, stat_list) {
         char devname[BDEVNAME_SIZE];
 
         update_general_status(si-&amp;gt;sbi);
&lt;/pre&gt;</description>
    <dc:creator>majianpeng</dc:creator>
    <dc:date>2013-05-14T12:06:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74463">
    <title>[Suggestion] fs/namespace.c: the direct cause of the warning for: "ida_remove called for id=0 which is not allocated" with mnt_release_group_id()</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74463</link>
    <description>&lt;pre&gt;Hello Maintainers:

After call collect_mounts(), then call drop_collected_mounts(), it will
report an warning: "ida_remove called for id=0 which is not allocated"
(one sample is audit_add_tree_rule() in kernel/audit_tree.c).

The direct cause (maybe also be the root cause):
  collect_mounts() passs 'CL_PRIVATE' to copy_tree() -&amp;gt; clone_mnt().
  it will set "mnt-&amp;gt;mnt_group_id = 0" in clone_mnt().
  when drop_collected_mounts() -&amp;gt; mnt_release_group_id(), 'mnt-&amp;gt;mnt_group_id == 0'.

Since it has already been marked as warn(), hope these information are
helpful to related members.


I just test audit subsystem, so find it (so execuse me, the test patch
and plan are still related audit sub system), the test patch is in
attachment, the test details and environments are below.


Test plan:
  code preparation for audit_tree.c:
    define a flag varaible.
    wait the flag to be true, before lock 'audit_filter_mutex' again. in audit_add_tree_rule()
    when evict_trunc() finish, set the flag true (also force 'postponed = NULL').
  firstly start: 'rm -rvf /tmp/gchen/linux-next'
  then start: 'audit -w /tmp/gchen/linux-next/drivers/char'
    (notice the order should not be changed, or all system call will be locked)

Test result:

if still set mnt-&amp;gt;mnt_group_id =0 in clone_mnt():

---------------------------log begin--------------------------------------------

[    4.256275] gchen_tag: ffff88009b0d8000, mnt: ffff88003645e400, mnt_alloc_group_id(): id: 1, res: 0, name: /dev/sda12
[    4.256282] gchen_tag: ffff88009b0d8000, mnt: ffff88009ad40d00, mnt_alloc_group_id(): id: 2, res: 0, name: devtmpfs
[    4.256286] gchen_tag: ffff88009b0d8000, mnt: ffff88009ad4e200, mnt_alloc_group_id(): id: 3, res: 0, name: devpts
[    4.256290] gchen_tag: ffff88009b0d8000, mnt: ffff88009ad08a00, mnt_alloc_group_id(): id: 4, res: 0, name: tmpfs
[    4.256293] gchen_tag: ffff88009b0d8000, mnt: ffff880036d61900, mnt_alloc_group_id(): id: 5, res: 0, name: proc
[    4.256297] gchen_tag: ffff88009b0d8000, mnt: ffff88009ad4ee00, mnt_alloc_group_id(): id: 6, res: 0, name: sysfs
[    4.256301] gchen_tag: ffff88009b0d8000, mnt: ffff880036bcd600, mnt_alloc_group_id(): id: 7, res: 0, name: securityfs
[    4.256304] gchen_tag: ffff88009b0d8000, mnt: ffff880036bcdc00, mnt_alloc_group_id(): id: 8, res: 0, name: selinuxfs
[    4.256308] gchen_tag: ffff88009b0d8000, mnt: ffff880098035700, mnt_alloc_group_id(): id: 9, res: 0, name: tmpfs
[    4.256312] gchen_tag: ffff88009b0d8000, mnt: ffff880098035600, mnt_alloc_group_id(): id: 10, res: 0, name: cgroup
[    4.256315] gchen_tag: ffff88009b0d8000, mnt: ffff88009b353b00, mnt_alloc_group_id(): id: 11, res: 0, name: tmpfs
[    4.274360] gchen_tag: ffff88009b0d8000, mnt: ffff8800986a1300, mnt_alloc_group_id(): id: 12, res: 0, name: cgroup
[    4.274598] gchen_tag: ffff88009b0d8000, mnt: ffff8800986a1100, mnt_alloc_group_id(): id: 13, res: 0, name: cgroup
[    4.274961] gchen_tag: ffff88009b0d8000, mnt: ffff880097858700, mnt_alloc_group_id(): id: 14, res: 0, name: cgroup
[    4.275181] gchen_tag: ffff88009b0d8000, mnt: ffff8800986a3800, mnt_alloc_group_id(): id: 15, res: 0, name: cgroup
[    4.275371] gchen_tag: ffff88009b0d8000, mnt: ffff8800986a3500, mnt_alloc_group_id(): id: 16, res: 0, name: cgroup
[    4.275575] gchen_tag: ffff88009b0d8000, mnt: ffff8800986a3a00, mnt_alloc_group_id(): id: 17, res: 0, name: cgroup
[    4.275839] gchen_tag: ffff88009b0d8000, mnt: ffff8800986a3e00, mnt_alloc_group_id(): id: 18, res: 0, name: cgroup
[    4.276065] gchen_tag: ffff88009b0d8000, mnt: ffff8800986a3300, mnt_alloc_group_id(): id: 19, res: 0, name: cgroup
[    5.416658] gchen_tag: ffff88009b0d8000, mnt: ffff880036a25b00, mnt_alloc_group_id(): id: 20, res: 0, name: systemd-1
[    6.278586] gchen_tag: ffff880036cdc650, mnt: ffff880036295e00, mnt_alloc_group_id(): id: 21, res: 0, name: mqueue
[    6.279539] gchen_tag: ffff880036deddc0, mnt: ffff880036295900, mnt_alloc_group_id(): id: 22, res: 0, name: configfs
[    6.281696] gchen_tag: ffff880036a19770, mnt: ffff88009a80db00, mnt_alloc_group_id(): id: 23, res: 0, name: tmpfs
[    6.300232] gchen_tag: ffff880036cdddc0, mnt: ffff88009a80df00, mnt_alloc_group_id(): id: 24, res: 0, name: debugfs
[    6.300318] gchen_tag: ffff880036adaee0, mnt: ffff880036e5c800, mnt_alloc_group_id(): id: 25, res: 0, name: hugetlbfs

[  129.989188] gchen_tag: ffff88009a0ec650, clone_mnt() let mnt-&amp;gt;mnt_group_id = 0
[  129.989202] gchen_tag: ffff88009a0ec650, get_tree(): count before: 1
[  129.989210] gchen_tag: ffff88009a0ec650, get_tree(): count before: 2
[  129.989217] gchen_tag: ffff88009a0ec650, mnt: ffff8800361de600, mnt_release_group_id(): id: 0, name: /dev/sda12
[  129.989221] ------------[ cut here ]------------
[  129.989230] WARNING: CPU: 0 PID: 895 at lib/idr.c:1065 ida_remove+0xbf/0x100()
[  129.989233] ida_remove called for id=0 which is not allocated.
[  129.989235] Modules linked in: lockd bnep bluetooth rfkill sunrpc ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables snd_intel8x0 snd_ac97_codec ac97_bus snd_seq iTCO_wdt snd_seq_device iTCO_vendor_support snd_pcm snd_page_alloc snd_timer ppdev lpc_ich mfd_core snd 8139too 8139cp parport_pc parport mii i2c_i801 microcode soundcore pcspkr uinput i915 video i2c_algo_bit drm_kms_helper drm i2c_core
[  129.989288] CPU: 0 PID: 895 Comm: auditctl Not tainted 3.10.0-rc1-next-20130513+ #6
[  129.989292] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./To be filled by O.E.M., BIOS 080012  11/14/2006
[  129.989295]  0000000000000009 ffff88009a07f8a8 ffffffff81621df0 0000000000000007
[  129.989301]  ffff88009a07f8f8 ffff88009a07f8e8 ffffffff8104a157 ffffffff819f2080
[  129.989307]  ffffffff81f94220 ffff880036bd2380 0000000000040000 0000000000000000
[  129.989313] Call Trace:
[  129.989324]  [&amp;lt;ffffffff81621df0&amp;gt;] dump_stack+0x46/0x58
[  129.989332]  [&amp;lt;ffffffff8104a157&amp;gt;] warn_slowpath_common+0x87/0xb0
[  129.989337]  [&amp;lt;ffffffff8104a236&amp;gt;] warn_slowpath_fmt+0x46/0x50
[  129.989342]  [&amp;lt;ffffffff812da79f&amp;gt;] ida_remove+0xbf/0x100
[  129.989349]  [&amp;lt;ffffffff811a3636&amp;gt;] mnt_release_group_id+0x56/0x80
[  129.989356]  [&amp;lt;ffffffff811b0085&amp;gt;] change_mnt_propagation+0x1a5/0x270
[  129.989362]  [&amp;lt;ffffffff811a484e&amp;gt;] umount_tree+0x15e/0x1c0
[  129.989367]  [&amp;lt;ffffffff811a5064&amp;gt;] drop_collected_mounts+0x34/0x50
[  129.989374]  [&amp;lt;ffffffff810cd1b0&amp;gt;] audit_add_tree_rule+0x1a0/0x340
[  129.989379]  [&amp;lt;ffffffff810c652c&amp;gt;] audit_receive_filter+0x71c/0x8b0
[  129.989386]  [&amp;lt;ffffffff8127edd9&amp;gt;] ? selinux_capable+0x39/0x50
[  129.989391]  [&amp;lt;ffffffff810c4060&amp;gt;] audit_receive+0x370/0xa30
[  129.989397]  [&amp;lt;ffffffff8150c22c&amp;gt;] ? __kmalloc_reserve.isra.52+0x3c/0xa0
[  129.989403]  [&amp;lt;ffffffff81545e59&amp;gt;] netlink_unicast+0x159/0x1d0
[  129.989408]  [&amp;lt;ffffffff8154618a&amp;gt;] netlink_sendmsg+0x2ba/0x370
[  129.989414]  [&amp;lt;ffffffff81503f16&amp;gt;] sock_sendmsg+0xa6/0xd0
[  129.989420]  [&amp;lt;ffffffff8114705d&amp;gt;] ? handle_pte_fault+0x8d/0xa00
[  129.989427]  [&amp;lt;ffffffff81504808&amp;gt;] SYSC_sendto+0x128/0x180
[  129.989433]  [&amp;lt;ffffffff8109c8ec&amp;gt;] ? ktime_get_ts+0x4c/0xf0
[  129.989439]  [&amp;lt;ffffffff81198da2&amp;gt;] ? poll_select_set_timeout+0x72/0x90
[  129.989445]  [&amp;lt;ffffffff81504e4e&amp;gt;] SyS_sendto+0xe/0x10
[  129.989451]  [&amp;lt;ffffffff81630602&amp;gt;] system_call_fastpath+0x16/0x1b
[  129.989454] ---[ end trace c01114c6695f73ff ]---
[  129.989466] gchen_tag: ffff88009a0ec650, audit_add_tree_rule(): begin waiting 100...., rule: ffff880036a40220
[  137.079385] gchen_tag: ffff88009a0eaee0, evict_chunk(): enter function postponed:           (null)
[  137.079405] gchen_tag: ffff88009a0eaee0, evict_chunk(): kill_rull postponed:           (null)
[  137.079410] gchen_tag: ffff88009a0eaee0, kill_rules(): list_del_init, rule: ffff880036a40220, tree:           (null)
[  137.079415] gchen_tag: ffff88009a0eaee0, evict_chunk(): audit_schedule_prune postponed:           (null)
[  137.081487] gchen_tag: ffff88009a0eaee0, evict_chunk(): set audit_test_count = true, postponed:           (null)
[  137.081497] gchen_tag: ffff88009a0ec650, audit_add_tree_rule(): end waiting, rule: ffff880036a40220
[  137.081505] gchen_tag: ffff88009a0ec650, audit_add_tree_rule(): list empty for rule-&amp;gt;rlist and return fail: ffff880036a40220
[  137.081509] gchen_tag: ffff88009a0ec650, put_tree(): count before: 3
[  137.081591] gchen_tag: ffff88009a0ec650, audit_free_rule(): remove entry: ffff880036a40200
[  137.081964] gchen_tag: ffff8800361f9770, put_tree(): count before: 2
[  137.086017] gchen_tag: ffff8800361fc650, put_tree(): count before: 1

---------------------------log end----------------------------------------------


if set mnt-&amp;gt;mnt_group_id with real value in clone_mnt(), the log will
be (will not report warning):

[  251.239821] gchen_tag: ffff8800987a0000, get_tree(): count before: 1
[  251.239832] gchen_tag: ffff8800987a0000, get_tree(): count before: 2
[  251.239840] gchen_tag: ffff8800987a0000, mnt: ffff880099aa6e00, mnt_release_group_id(): id: 1, name: /dev/sda12
[  251.239854] gchen_tag: ffff8800987a0000, audit_add_tree_rule(): begin waiting 100...., rule: ffff880036085820
[  257.465740] gchen_tag: ffff8800987a1770, evict_chunk(): enter function postponed:           (null)
[  257.465821] gchen_tag: ffff8800987a1770, evict_chunk(): kill_rull postponed:           (null)
[  257.465831] gchen_tag: ffff8800987a1770, kill_rules(): list_del_init, rule: ffff880036085820, tree:           (null)
[  257.465835] gchen_tag: ffff8800987a1770, evict_chunk(): audit_schedule_prune postponed:           (null)
[  257.465977] gchen_tag: ffff8800987a1770, evict_chunk(): set audit_test_count = true, postponed:           (null)
[  257.465985] gchen_tag: ffff8800987a0000, audit_add_tree_rule(): end waiting, rule: ffff880036085820
[  257.465990] gchen_tag: ffff8800987a0000, audit_add_tree_rule(): list empty for rule-&amp;gt;rlist and return fail: ffff880036085820
[  257.465994] gchen_tag: ffff8800987a0000, put_tree(): count before: 3
[  257.466083] gchen_tag: ffff8800987a0000, audit_free_rule(): remove entry: ffff880036085800
[  257.466712] gchen_tag: ffff880036005dc0, put_tree(): count before: 2
[  257.470049] gchen_tag: ffff8800987a1770, put_tree(): count before: 1




The other information about my machine:

[root&amp;lt; at &amp;gt;dhcp122 lib]# mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=1269756k,nr_inodes=317439,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)
/dev/sda12 on / type ext4 (rw,relatime,seclabel,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,seclabel,mode=755)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel)
configfs on /sys/kernel/config type configfs (rw,relatime)
[root&amp;lt; at &amp;gt;dhcp122 lib]# df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
devtmpfs       devtmpfs  1.3G     0  1.3G   0% /dev
tmpfs          tmpfs     1.3G   84K  1.3G   1% /dev/shm
tmpfs          tmpfs     1.3G 1008K  1.3G   1% /run
/dev/sda12     ext4       37G   20G   17G  55% /
tmpfs          tmpfs     1.3G     0  1.3G   0% /sys/fs/cgroup
tmpfs          tmpfs     1.3G     0  1.3G   0% /media
[root&amp;lt; at &amp;gt;dhcp122 lib]#
[root&amp;lt; at &amp;gt;dhcp122 ~]# uname -a
Linux dhcp122.asianux.net 3.10.0-rc1-next-20130513+ #7 SMP Wed May 15 00:31:54 CST 2013 x86_64 x86_64 x86_64 GNU/Linux
[root&amp;lt; at &amp;gt;dhcp122 ~]# cat /proc/meminfo 
MemTotal:        2559344 kB
MemFree:         2054536 kB
Buffers:           55256 kB
Cached:           248740 kB
SwapCached:            0 kB
Active:           172812 kB
Inactive:         247612 kB
Active(anon):     117252 kB
Inactive(anon):   101024 kB
Active(file):      55560 kB
Inactive(file):   146588 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       4095996 kB
SwapFree:        4095996 kB
Dirty:                 4 kB
Writeback:             0 kB
AnonPages:        116468 kB
Mapped:            37964 kB
Shmem:            101856 kB
Slab:              44872 kB
SReclaimable:      16992 kB
SUnreclaim:        27880 kB
KernelStack:        1128 kB
PageTables:        10760 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     5375668 kB
Committed_AS:     632456 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      279600 kB
VmallocChunk:   34359454080 kB
HardwareCorrupted:     0 kB
AnonHugePages:     14336 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       53056 kB
DirectMap2M:     2560000 kB
[root&amp;lt; at &amp;gt;dhcp122 ~]# cat /proc/cpuinfo 
processor: 0
vendor_id: GenuineIntel
cpu family: 15
model: 6
model name: Intel(R) Pentium(R) 4 CPU 3.20GHz
stepping: 5
microcode: 0x7
cpu MHz: 3200.000
cache size: 2048 KB
physical id: 0
siblings: 1
core id: 0
cpu cores: 1
apicid: 0
initial apicid: 0
fpu: yes
fpu_exception: yes
cpuid level: 6
wp: yes
flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts nopl pni dtes64 monitor ds_cpl est tm2 cid cx16 xtpr pdcm lahf_lm
bogomips: 6384.22
clflush size: 64
cache_alignment: 128
address sizes: 36 bits physical, 48 bits virtual
power management:

processor: 1
vendor_id: GenuineIntel
cpu family: 15
model: 6
model name: Intel(R) Pentium(R) 4 CPU 3.20GHz
stepping: 5
microcode: 0x7
cpu MHz: 3200.000
cache size: 2048 KB
physical id: 0
siblings: 1
core id: 0
cpu cores: 0
apicid: 1
initial apicid: 1
fpu: yes
fpu_exception: yes
cpuid level: 6
wp: yes
flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts nopl pni dtes64 monitor ds_cpl est tm2 cid cx16 xtpr pdcm lahf_lm
bogomips: 6384.22
clflush size: 64
cache_alignment: 128
address sizes: 36 bits physical, 48 bits virtual
power management:





&lt;/pre&gt;</description>
    <dc:creator>Chen Gang</dc:creator>
    <dc:date>2013-05-14T09:06:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74451">
    <title>Ежели нужен устойчивейший успех</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74451</link>
    <description>&lt;pre&gt;  Подробности: http://tinyurl.com/d6uvtb7 . Вы получите возможность общаться на английском непосредственно следом после дебютного занятия. Превратить личную жизнь помногообразней, воспламениться прелюбопытным делом. Экспресс-курс для начинающих так же углублённых. Убыстренное обучение. Употребляются засекреченные приемы. Взвинтить личную цену на рынке работы. Расширить круг общения. заняться развитием, потренировать память. Определенная композиция осваиваемого материала - нацеливание на результат. 
 
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Елена Сергеевна</dc:creator>
    <dc:date>2013-05-13T02:54:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74367">
    <title>сувенир выполнен поражать</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74367</link>
    <description>&lt;pre&gt;   
  данное cамая чуднейшая управляемая с пульта модель хоть-когда - либо созданная! Круглый хит продаж. В восторге будут не только дети но так же зрелые. Информация: http://bit.ly/149HaXW 
 
 

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>madlenstar</dc:creator>
    <dc:date>2013-05-12T18:03:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74335">
    <title>[PATCH v6 00/31] kmemcg shrinkers</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74335</link>
    <description>&lt;pre&gt;Initial notes:
==============

Mel, Dave, this is the last round of fixes I have for the series. The fixes are
few, and I was mostly interested in getting this out based on an up2date tree
so Dave can verify it. This should apply fine ontop of Friday's linux-next.
Alternatively, please grab from branch "kmemcg-lru-shrinker" at:

git://git.kernel.org/pub/scm/linux/kernel/git/glommer/memcg.git

Main changes from *v5:
* Rebased to linux-next, and fix the conflicts with the dcache.
* Make sure LRU_RETRY only retry once
* Prevent the bcache shrinker to scan the caches when disabled (by returning
  0 in the count function)
* Fix i915 return code when mutex cannot be acquired.
* Only scan less-than-batch objects in memcg scenarios

Hi,

This patchset implements targeted shrinking for memcg when kmem limits are
present. So far, we've been accounting kernel objects but failing allocations
when short of memory. This is because our only option would be to call the
global shrinker, depleting objects from all caches and breaking isolation.

The main idea is to associate per-memcg lists with each of the LRUs. The main
LRU still provides a single entry point and when adding or removing an element
from the LRU, we use the page information to figure out which memcg it belongs
to and relay it to the right list.

Base work:
==========

Please note that this builds upon the recent work from Dave Chinner that
sanitizes the LRU shrinking API and make the shrinkers node aware. Node
awareness is not *strictly* needed for my work, but I still perceive it
as an advantage. The API unification is a major need, and I build upon it
heavily. That allows us to manipulate the LRUs without knowledge of the
underlying objects with ease. This time, I am including that work here as
a baseline.

Main changes from *v5:
* Rebased to linux-next, and fix the conflicts with the dcache.
* Make sure LRU_RETRY only retry once
* Prevent the bcache shrinker to scan the caches when disabled (by returning
  0 in the count function)
* Fix i915 return code when mutex cannot be acquired.
* Only scan less-than-batch objects in memcg scenarios

Main changes from *v4:
* Fixed a bug in user-generated memcg pressure
* Fixed overly-agressive slab shrinker behavior spotted by Mel Gorman
* Various other fixes and comments by Mel Gorman

Main changes from *v3:
* Merged suggestions from mailing list.
* Removed the memcg-walking code from LRU. vmscan now drives all the hierarchy
  decisions, which makes more sense
* lazily free the old memcg arrays (needs now to be saved in struct lru). Since
  we need to call synchronize_rcu, calling it for every LRU can become expensive
* Moved the dead memcg shrinker to vmpressure. Already independently sent to
  linux-mm for review.
* Changed locking convention for LRU_RETRY. It now needs to return locked, which
  silents warnings about possible lock unbalance (although previous code was
  correct)

Main changes from *v2:
* shrink dead memcgs when global pressure kicks in. Uses the new lru API.
* bugfixes and comments from the mailing list.
* proper hierarchy-aware walk in shrink_slab.

Main changes from *v1:
* merged comments from the mailing list
* reworked lru-memcg API
* effective proportional shrinking
* sanitized locking on the memcg side
* bill user memory first when kmem == umem
* various bugfixes

Dave Chinner (17):
  dcache: convert dentry_stat.nr_unused to per-cpu counters
  dentry: move to per-sb LRU locks
  dcache: remove dentries from LRU before putting on dispose list
  mm: new shrinker API
  shrinker: convert superblock shrinkers to new API
  list: add a new LRU list type
  inode: convert inode lru list to generic lru list code.
  dcache: convert to use new lru list infrastructure
  list_lru: per-node list infrastructure
  shrinker: add node awareness
  fs: convert inode and dentry shrinking to be node aware
  xfs: convert buftarg LRU to generic code
  xfs: convert dquot cache lru to list_lru
  fs: convert fs shrinkers to new scan/count API
  drivers: convert shrinkers to new count/scan API
  shrinker: convert remaining shrinkers to count/scan API
  shrinker: Kill old -&amp;gt;shrink API.

Glauber Costa (14):
  super: fix calculation of shrinkable objects for small numbers
  i915: bail out earlier when shrinker cannot acquire mutex
  hugepage: convert huge zero page shrinker to new shrinker API
  vmscan: also shrink slab in memcg pressure
  memcg,list_lru: duplicate LRUs upon kmemcg creation
  lru: add an element to a memcg list
  list_lru: per-memcg walks
  memcg: per-memcg kmem shrinking
  memcg: scan cache objects hierarchically
  vmscan: take at least one pass with shrinkers
  super: targeted memcg reclaim
  memcg: move initialization to memcg creation
  vmpressure: in-kernel notifications
  memcg: reap dead memcgs upon global memory pressure.

 arch/x86/kvm/mmu.c                        |  28 +-
 drivers/gpu/drm/i915/i915_dma.c           |   4 +-
 drivers/gpu/drm/i915/i915_gem.c           |  71 +++--
 drivers/gpu/drm/ttm/ttm_page_alloc.c      |  48 ++--
 drivers/gpu/drm/ttm/ttm_page_alloc_dma.c  |  55 ++--
 drivers/md/bcache/btree.c                 |  43 +--
 drivers/md/bcache/sysfs.c                 |   2 +-
 drivers/md/dm-bufio.c                     |  65 +++--
 drivers/staging/android/ashmem.c          |  46 +++-
 drivers/staging/android/lowmemorykiller.c |  40 +--
 drivers/staging/zcache/zcache-main.c      |  29 +-
 fs/dcache.c                               | 240 ++++++++++-------
 fs/drop_caches.c                          |   1 +
 fs/ext4/extents_status.c                  |  30 ++-
 fs/gfs2/glock.c                           |  30 ++-
 fs/gfs2/main.c                            |   3 +-
 fs/gfs2/quota.c                           |  14 +-
 fs/gfs2/quota.h                           |   4 +-
 fs/inode.c                                | 175 +++++-------
 fs/internal.h                             |   5 +
 fs/mbcache.c                              |  53 ++--
 fs/nfs/dir.c                              |  20 +-
 fs/nfs/internal.h                         |   4 +-
 fs/nfs/super.c                            |   3 +-
 fs/nfsd/nfscache.c                        |  31 ++-
 fs/quota/dquot.c                          |  39 ++-
 fs/super.c                                | 107 +++++---
 fs/ubifs/shrinker.c                       |  20 +-
 fs/ubifs/super.c                          |   3 +-
 fs/ubifs/ubifs.h                          |   3 +-
 fs/xfs/xfs_buf.c                          | 169 ++++++------
 fs/xfs/xfs_buf.h                          |   5 +-
 fs/xfs/xfs_dquot.c                        |   7 +-
 fs/xfs/xfs_icache.c                       |   4 +-
 fs/xfs/xfs_icache.h                       |   2 +-
 fs/xfs/xfs_qm.c                           | 275 +++++++++----------
 fs/xfs/xfs_qm.h                           |   4 +-
 fs/xfs/xfs_super.c                        |  12 +-
 include/linux/dcache.h                    |   4 +
 include/linux/fs.h                        |  25 +-
 include/linux/list_lru.h                  | 145 ++++++++++
 include/linux/memcontrol.h                |  45 ++++
 include/linux/shrinker.h                  |  44 ++-
 include/linux/swap.h                      |   2 +
 include/linux/vmpressure.h                |   6 +
 include/trace/events/vmscan.h             |   4 +-
 lib/Makefile                              |   2 +-
 lib/list_lru.c                            | 433 ++++++++++++++++++++++++++++++
 mm/huge_memory.c                          |  17 +-
 mm/memcontrol.c                           | 430 +++++++++++++++++++++++++----
 mm/memory-failure.c                       |   2 +
 mm/slab_common.c                          |   1 -
 mm/vmpressure.c                           |  52 +++-
 mm/vmscan.c                               | 325 +++++++++++++++-------
 net/sunrpc/auth.c                         |  45 +++-
 55 files changed, 2339 insertions(+), 937 deletions(-)
 create mode 100644 include/linux/list_lru.h
 create mode 100644 lib/list_lru.c

&lt;/pre&gt;</description>
    <dc:creator>Glauber Costa</dc:creator>
    <dc:date>2013-05-12T18:13:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74278">
    <title>[PATCH v2] nilfs2: fix issue of nilfs_set_page_dirty for page at EOF boundary</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74278</link>
    <description>&lt;pre&gt;Hi Andrew,

This is the revised patch for the problem that Anthony Doggett
reported and Vyacheslav originally proposed a bug fix with the patch
titled "nilfs2: fix issue with broken bmap for the case of block size
lesser than 4 KB".

I corrected the flaw you pointed out, and performed another round of
tests.

Changes from the first patch are:

- Fix buffer_dirty check (set_buffer_dirty was mistakenly done against
  already dirty buffer instead of non-dirty buffer).

- Add a comment to note that page lock is protecting the sequence of
  buffer_dirty check and set_buffer_dirty from concurrent threads.


Please apply this instead.


Thanks,
Ryusuke Konishi
--
From: Ryusuke Konishi &amp;lt;konishi.ryusuke&amp;lt; at &amp;gt;lab.ntt.co.jp&amp;gt;

nilfs2: fix issue of nilfs_set_page_dirty for page at EOF boundary

DESCRIPTION:
There are use-cases when NILFS2 file system (formatted with block size
lesser than 4 KB) can be remounted in RO mode because of encountering
of "broken bmap" issue.

The issue was reported by Anthony Doggett
&amp;lt;Anthony2486&amp;lt; at &amp;gt;interfaces.org.uk&amp;gt;: "The machine I've been trialling
nilfs on is running Debian Testing, Linux version 3.2.0-4-686-pae
(debian-kernel&amp;lt; at &amp;gt;lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14)
) #1 SMP Debian 3.2.35-2), but I've also reproduced it (identically)
with Debian Unstable amd64 and Debian Experimental (using the
3.8-trunk kernel).  The problematic partitions were formatted with
"mkfs.nilfs2 -b 1024 -B 8192"."

SYMPTOMS:
(1) System log contains error messages likewise:

    [63102.496756] nilfs_direct_assign: invalid pointer: 0
    [63102.496786] NILFS error (device dm-17): nilfs_bmap_assign: broken bmap (inode number=28)
    [63102.496798]
    [63102.524403] Remounting filesystem read-only

(2) The NILFS2 file system is remounted in RO mode.

REPRODUSING PATH:
(1) Create volume group with name "unencrypted" by means of vgcreate utility.
(2) Run script (prepared by Anthony Doggett &amp;lt;Anthony2486&amp;lt; at &amp;gt;interfaces.org.uk&amp;gt;):

----------------[BEGIN SCRIPT]--------------------

VG=unencrypted
lvcreate --size 2G --name ntest $VG
mkfs.nilfs2 -b 1024 -B 8192 /dev/mapper/$VG-ntest
mkdir /var/tmp/n
mkdir /var/tmp/n/ntest
mount /dev/mapper/$VG-ntest /var/tmp/n/ntest
mkdir /var/tmp/n/ntest/thedir
cd /var/tmp/n/ntest/thedir
sleep 2
date
darcs init
sleep 2
dmesg|tail -n 5
date
darcs whatsnew || true
date
sleep 2
dmesg|tail -n 5
----------------[END SCRIPT]--------------------

REPRODUCIBILITY: 100%

INVESTIGATION:
As it was discovered, the issue takes place during segment
construction after executing such sequence of user-space operations:

open("_darcs/index", O_RDWR|O_CREAT|O_NOCTTY, 0666) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
ftruncate(7, 60)

The error message "NILFS error (device dm-17): nilfs_bmap_assign:
broken bmap (inode number=28)" takes place because of trying to get
block number for third block of the file with logical offset #3072
bytes. As it is possible to see from above output, the file has 60
bytes of the whole size. So, it is enough one block (1 KB in size)
allocation for the whole file. Trying to operate with several blocks
instead of one takes place because of discovering several dirty
buffers for this file in nilfs_segctor_scan_file() method.

The root cause of this issue is in nilfs_set_page_dirty function which
is called just before writing to an mmapped page.

When nilfs_page_mkwrite function handles a page at EOF boundary, it
fills hole blocks only inside EOF through __block_page_mkwrite().

The __block_page_mkwrite() function calls set_page_dirty() after
filling hole blocks, thus nilfs_set_page_dirty function (=
a_ops-&amp;gt;set_page_dirty) is called.  However, the current implementation
of nilfs_set_page_dirty() wrongly marks all buffers dirty even for
page at EOF boundary.

As a result, buffers outside EOF are inconsistently marked dirty and
queued for write even though they are not mapped with nilfs_get_block
function.

FIX:
This modifies nilfs_set_page_dirty() not to mark hole blocks dirty.

Thanks to Vyacheslav Dubeyko for his effort on analysis and proposals
for this issue.

Reported-by: Anthony Doggett &amp;lt;Anthony2486&amp;lt; at &amp;gt;interfaces.org.uk&amp;gt;
Reported-by: Vyacheslav Dubeyko &amp;lt;slava&amp;lt; at &amp;gt;dubeyko.com&amp;gt;
Signed-off-by: Ryusuke Konishi &amp;lt;konishi.ryusuke&amp;lt; at &amp;gt;lab.ntt.co.jp&amp;gt;
Cc: Vyacheslav Dubeyko &amp;lt;slava&amp;lt; at &amp;gt;dubeyko.com&amp;gt;
Tested-by: Ryusuke Konishi &amp;lt;konishi.ryusuke&amp;lt; at &amp;gt;lab.ntt.co.jp&amp;gt;
Cc: &amp;lt;stable&amp;lt; at &amp;gt;vger.kernel.org&amp;gt;
---
 fs/nilfs2/inode.c |   27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
index 689fb60..bccfec8 100644
--- a/fs/nilfs2/inode.c
+++ b/fs/nilfs2/inode.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -219,13 +219,32 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int nilfs_writepage(struct page *page, struct writeback_control *wbc)
 
 static int nilfs_set_page_dirty(struct page *page)
 {
-int ret = __set_page_dirty_buffers(page);
+int ret = __set_page_dirty_nobuffers(page);
 
-if (ret) {
+if (page_has_buffers(page)) {
 struct inode *inode = page-&amp;gt;mapping-&amp;gt;host;
-unsigned nr_dirty = 1 &amp;lt;&amp;lt; (PAGE_SHIFT - inode-&amp;gt;i_blkbits);
+unsigned nr_dirty = 0;
+struct buffer_head *bh, *head;
 
-nilfs_set_file_dirty(inode, nr_dirty);
+/*
+ * This page is locked by callers, and no other thread
+ * concurrently marks its buffers dirty since they are
+ * only dirtied through routines in fs/buffer.c in
+ * which call sites of mark_buffer_dirty are protected
+ * by page lock.
+ */
+bh = head = page_buffers(page);
+do {
+/* Do not mark hole blocks dirty */
+if (buffer_dirty(bh) || !buffer_mapped(bh))
+continue;
+
+set_buffer_dirty(bh);
+nr_dirty++;
+} while (bh = bh-&amp;gt;b_this_page, bh != head);
+
+if (nr_dirty)
+nilfs_set_file_dirty(inode, nr_dirty);
 }
 return ret;
 }
&lt;/pre&gt;</description>
    <dc:creator>Ryusuke Konishi</dc:creator>
    <dc:date>2013-05-11T07:12:26</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.file-systems/74259">
    <title>[PATCH] trivial comment fix</title>
    <link>http://comments.gmane.org/gmane.linux.file-systems/74259</link>
    <description>&lt;pre&gt;From: "J. Bruce Fields" &amp;lt;bfields&amp;lt; at &amp;gt;redhat.com&amp;gt;

---
 fs/dcache.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 8086636..a0b8d65 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1141,7 +1141,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; rename_retry:
 EXPORT_SYMBOL(have_submounts);
 
 /*
- * Search the dentry child list for the specified parent,
+ * Search the dentry child list of the specified parent,
  * and move any unused dentries to the end of the unused
  * list for prune_dcache(). We descend to the next level
  * whenever the d_subdirs list is non-empty and continue
&lt;/pre&gt;</description>
    <dc:creator>J. Bruce Fields</dc:creator>
    <dc:date>2013-05-10T15:10:01</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.linux.file-systems">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.file-systems</link>
  </textinput>
</rdf:RDF>
