History log of /openbmc/linux/fs/ufs/inode.c (Results 26 – 50 of 249)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v4.7.3, v4.4.20, v4.7.2, v4.4.19, openbmc-4.4-20160819-1, v4.7.1, v4.4.18, v4.4.17, openbmc-4.4-20160804-1, v4.4.16, v4.7, openbmc-4.4-20160722-1, openbmc-20160722-1, openbmc-20160713-1, v4.4.15, v4.6.4, v4.6.3, v4.4.14, v4.6.2, v4.4.13, openbmc-20160606-1, v4.6.1, v4.4.12
# 31051c85 26-May-2016 Jan Kara <jack@suse.cz>

fs: Give dentry to inode_change_ok() instead of inode

inode_change_ok() will be resposible for clearing capabilities and IMA
extended attributes and as such will need dentry. Give it as an argument

fs: Give dentry to inode_change_ok() instead of inode

inode_change_ok() will be resposible for clearing capabilities and IMA
extended attributes and as such will need dentry. Give it as an argument
to inode_change_ok() instead of an inode. Also rename inode_change_ok()
to setattr_prepare() to better relect that it does also some
modifications in addition to checks.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>

show more ...


Revision tags: openbmc-20160521-1, v4.4.11, openbmc-20160518-1, v4.6, v4.4.10, openbmc-20160511-1, openbmc-20160505-1, v4.4.9, v4.4.8, v4.4.7
# 09cbfeaf 01-Apr-2016 Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros

PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
ago with promise that one day it will be possible to impleme

mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros

PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
ago with promise that one day it will be possible to implement page
cache with bigger chunks than PAGE_SIZE.

This promise never materialized. And unlikely will.

We have many places where PAGE_CACHE_SIZE assumed to be equal to
PAGE_SIZE. And it's constant source of confusion on whether
PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
especially on the border between fs and mm.

Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
breakage to be doable.

Let's stop pretending that pages in page cache are special. They are
not.

The changes are pretty straight-forward:

- <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;

- <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;

- PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};

- page_cache_get() -> get_page();

- page_cache_release() -> put_page();

This patch contains automated changes generated with coccinelle using
script below. For some reason, coccinelle doesn't patch header files.
I've called spatch for them manually.

The only adjustment after coccinelle is revert of changes to
PAGE_CAHCE_ALIGN definition: we are going to drop it later.

There are few places in the code where coccinelle didn't reach. I'll
fix them manually in a separate patch. Comments and documentation also
will be addressed with the separate patch.

virtual patch

@@
expression E;
@@
- E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
expression E;
@@
- E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT

@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE

@@
@@
- PAGE_CACHE_MASK
+ PAGE_MASK

@@
expression E;
@@
- PAGE_CACHE_ALIGN(E)
+ PAGE_ALIGN(E)

@@
expression E;
@@
- page_cache_get(E)
+ get_page(E)

@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

show more ...


Revision tags: openbmc-20160329-2, openbmc-20160329-1, openbmc-20160321-1, v4.4.6, v4.5, v4.4.5, v4.4.4, v4.4.3, openbmc-20160222-1, v4.4.2, openbmc-20160212-1, openbmc-20160210-1, openbmc-20160202-2, openbmc-20160202-1, v4.4.1, openbmc-20160127-1, openbmc-20160120-1, v4.4, openbmc-20151217-1, openbmc-20151210-1, openbmc-20151202-1, openbmc-20151123-1, openbmc-20151118-1
# 21fc61c7 17-Nov-2015 Al Viro <viro@zeniv.linux.org.uk>

don't put symlink bodies in pagecache into highmem

kmap() in page_follow_link_light() needed to go - allowing to hold
an arbitrary number of kmaps for long is a great way to deadlocking
the system.

don't put symlink bodies in pagecache into highmem

kmap() in page_follow_link_light() needed to go - allowing to hold
an arbitrary number of kmaps for long is a great way to deadlocking
the system.

new helper (inode_nohighmem(inode)) needs to be used for pagecache
symlinks inodes; done for all in-tree cases. page_follow_link_light()
instrumented to yell about anything missed.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

show more ...


# 9cdce3c0 15-Nov-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs: get rid of ->setattr() for symlinks

It was to needed for a couple of months in 2010, until UFS
quota support got dropped. Since then it's equivalent to
simple_setattr() (i.e. the default) for

ufs: get rid of ->setattr() for symlinks

It was to needed for a couple of months in 2010, until UFS
quota support got dropped. Since then it's equivalent to
simple_setattr() (i.e. the default) for everything except the
regular files. And dropping it there allows to convert all
UFS symlinks to {page,simple}_symlink_inode_operations, getting
rid of fs/ufs/symlink.c completely.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

show more ...


Revision tags: openbmc-20151104-1, v4.3, openbmc-20151102-1, openbmc-20151028-1, v4.3-rc1, v4.2, v4.2-rc8, v4.2-rc7, v4.2-rc6, v4.2-rc5, v4.2-rc4, v4.2-rc3, v4.2-rc2, v4.2-rc1, v4.1
# 4e317ce7 19-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs_inode_get{frag,block}(): get rid of 'phys' argument

Just pass NULL as locked_page in case of first block in the indirect
chain. Old calling conventions aside, a reason for having 'phys'
was tha

ufs_inode_get{frag,block}(): get rid of 'phys' argument

Just pass NULL as locked_page in case of first block in the indirect
chain. Old calling conventions aside, a reason for having 'phys'
was that ufs_inode_getfrag() used to be able to do _two_ allocations
- indirect block and extending/reallocating a tail. We needed
locked_page for the latter (it's a data), but we also needed to
figure out that indirect block is metadata. So we used to pass
non-NULL locked_page in all cases *and* used NULL phys as
indication of being asked to allocate an indirect.

With tail unpacking taken into a separate function we don't need
those convolutions anymore.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

show more ...


# 0385f1f9 19-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs_getfrag_block(): tidy up a bit

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 5fbfb238 19-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs_inode_getblock(): failure to read an indirect block is -EIO

... and not "write to beginning of the disk", TYVM...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 4eeff4c9 19-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs_getfrag_block(): turn following indirects into a loop

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 5336970b 19-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs_inode_getfrag(): pass index instead of 'fragment'

same story as with ufs_inode_getblock()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 0f3c1294 19-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs_inode_getfrag(): split extending the partial blocks off

ufs_extend_tail() is handling that now.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 619cfac0 19-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs_inode_getblock(): pass indirect block number and full index

... instead of messing with buffer_head. We can bloody well do
sb_bread() in there.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 721435a7 19-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs_inode_getblock(): pass index instead of 'fragment'

The value passed to ufs_inode_getblock() as the 3rd argument
had lower bits ignored; the upper bits were shifted down
and used and they actuall

ufs_inode_getblock(): pass index instead of 'fragment'

The value passed to ufs_inode_getblock() as the 3rd argument
had lower bits ignored; the upper bits were shifted down
and used and they actually make sense - those are _lower_ bits
of index in indirect block (i.e. they form the index within
a fragment within an indirect block).

Pass those as argument. Upper bits of index (i.e. the number
of fragment within indirect block) will join them shortly.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

show more ...


# 177848a0 18-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs_inode_get{frag,block}(): leave sb_getblk() to caller

just return the damn block number

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 8d9dcf14 18-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs_getfrag_block(): get rid of macro jungles

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# bbb3eb9d 18-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs_inode_get{frag,block}(): consolidate success exits

These calling conventions are rudiments of pre-2.3 times; they
really need to be sanitized. This is the first step; next
will be _always_ retu

ufs_inode_get{frag,block}(): consolidate success exits

These calling conventions are rudiments of pre-2.3 times; they
really need to be sanitized. This is the first step; next
will be _always_ returning a block number, instead of this
"return a pointer to buffer_head, except when we get to the
actual data" crap.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

show more ...


Revision tags: v4.1-rc8, v4.1-rc7
# 71dd4284 04-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs: use the branch depth in ufs_getfrag_block()

we'd already calculated it...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 4b7068c8 04-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs: move calculation of offsets into ufs_getfrag_block()

... and massage ufs_frag_map() to take those instead of fragment number.

As it is, we duplicate the damn thing on the write side, open-code

ufs: move calculation of offsets into ufs_getfrag_block()

... and massage ufs_frag_map() to take those instead of fragment number.

As it is, we duplicate the damn thing on the write side, open-coded and
bloody hard to follow.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

show more ...


# 5a39c255 18-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs_inode_get{frag,block}(): get rid of retries

We are holding ->truncate_mutex, so nobody else can alter our
block pointers. Rechecks/retries were needed back when we
only held BKL there, and had

ufs_inode_get{frag,block}(): get rid of retries

We are holding ->truncate_mutex, so nobody else can alter our
block pointers. Rechecks/retries were needed back when we
only held BKL there, and had to cope with write_begin/writepage
and writepage/truncate races. Can't happen anymore...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

show more ...


# f53bd142 18-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

__ufs_truncate_blocks(): avoid excessive dirtying of indirect blocks

There's a case when an indirect block gets dirtied for no good
reason - when there's a hole starting in the middle of area
covere

__ufs_truncate_blocks(): avoid excessive dirtying of indirect blocks

There's a case when an indirect block gets dirtied for no good
reason - when there's a hole starting in the middle of area
covered by it and spanning past its end, and truncate() is done
precisely to the beginning of the hole.

The block is obviously not modified at all - all removals happen
beyond it. However, existing code ends up dirtying it just in
case. It's trivial to fix and while it's not a real bug by any
stretch of imagination, it makes the damn thing harder to follow.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

show more ...


# cc7231e3 18-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

free_full_branch(): don't bother modifying the block we are going to free

Note that it's already made unreachable from the inode, so we don't have
to worry about ufs_frag_map() walking into somethin

free_full_branch(): don't bother modifying the block we are going to free

Note that it's already made unreachable from the inode, so we don't have
to worry about ufs_frag_map() walking into something already freed.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

show more ...


# b6eede0e 18-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

move marking inode dirty to the end of __ufs_truncate_blocks()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 163073db 18-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

free_full_branch(): saner calling conventions

Have caller fetch the block number *and* remove it from wherever
it was. Pass the block number instead.

Signed-off-by: Al Viro <viro@zeniv.linux.org.u

free_full_branch(): saner calling conventions

Have caller fetch the block number *and* remove it from wherever
it was. Pass the block number instead.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

show more ...


# 7b4e4f7f 18-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs_trunc_branch(): kill recursion

turn recursion into a pair of loops

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 6aab6dd3 18-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

ufs_trunc_branch(): massage towards killing recursion

We always have 0 < depth2 <= depth in there, so
if (--depth) {
if (--depth2)
A
B
} else {
C // not using depth2
}
D // not using depth2

is

ufs_trunc_branch(): massage towards killing recursion

We always have 0 < depth2 <= depth in there, so
if (--depth) {
if (--depth2)
A
B
} else {
C // not using depth2
}
D // not using depth2

is equivalent to

if (--depth2)
A with s/depth/depth - 1/
if (--depth)
B
else
C
D

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

show more ...


# 6d1ebbca 18-Jun-2015 Al Viro <viro@zeniv.linux.org.uk>

split ufs_truncate_branch() into full- and partial-branch variants

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


12345678910