Re: [PATCH] fs: Move check for mappings without pages from iterate_bdevs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 25, 2012 at 11:22:07AM +0200, Jan Kara wrote:
> Currently, iterate_bdevs() skips block devices without any pages in page
> cache. That is fine for current use by sync(2) but may be rather surprising
> for possible future users. So move the checks from iterate_bdevs() to
> callback functions used by sync(2).

*snort*

You know, testing is occasionally useful.  Sure, it's boring, but once in
a while one gets amusing results.  The thing is, the only reason why the
sucker hadn't oopsed *without* that patch was that the only non-bdev on that
inode list happened to have zero in ->mapping->nr_pages.  Reliably.
What we'd accidentally avoided (until that patch) was stepping on the
root directory of bdev filesystem.  I_BDEV() on it is fine - it's allocated
in a regular way, so we are not doing anything bad with container_of() here.
However, it never went through bdget(), obviously - just new_inode().  And
it has I_BDEV(inode)->bd_inode == NULL.  The rest is obious...

More interesting question is whether inode list is the right approach.  After
all, there's a list with suggestive name - all_bdevs...
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux