- May 09, 2022
-
-
Matthew Wilcox (Oracle) authored
This function is NOT converted to handle large folios, so include an assert that the filesystem isn't passing one in. Otherwise, use the folio functions instead of the page functions, where they exist. Convert all filesystems which use block_read_full_page(). Signed-off-by:
Matthew Wilcox (Oracle) <willy@infradead.org>
-
- May 08, 2022
-
-
Matthew Wilcox (Oracle) authored
There are no more aop flags left, so remove the parameter. Signed-off-by:
Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by:
Christoph Hellwig <hch@lst.de>
-
Matthew Wilcox (Oracle) authored
There are no more aop flags left, so remove the parameter. Signed-off-by:
Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by:
Christoph Hellwig <hch@lst.de>
-
- Mar 22, 2022
-
-
Muchun Song authored
The inode allocation is supposed to use alloc_inode_sb(), so convert kmem_cache_alloc() of all filesystems to alloc_inode_sb(). Link: https://lkml.kernel.org/r/20220228122126.37293-5-songmuchun@bytedance.com Signed-off-by:
Muchun Song <songmuchun@bytedance.com> Acked-by: Theodore Ts'o <tytso@mit.edu> [ext4] Acked-by:
Roman Gushchin <roman.gushchin@linux.dev> Cc: Alex Shi <alexs@kernel.org> Cc: Anna Schumaker <Anna.Schumaker@Netapp.com> Cc: Chao Yu <chao@kernel.org> Cc: Dave Chinner <david@fromorbit.com> Cc: Fam Zheng <fam.zheng@bytedance.com> Cc: Jaegeuk Kim <jaegeuk@kernel.org> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Kari Argillander <kari.argillander@gmail.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Michal Hocko <mhocko@kernel.org> Cc: Qi Zheng <zhengqi.arch@bytedance.com> Cc: Shakeel Butt <shakeelb@google.com> Cc: Trond Myklebust <trond.myklebust@hammerspace.com> Cc: Vladimir Davydov <vdavydov.dev@gmail.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Wei Yang <richard.weiyang@gmail.com> Cc: Xiongchun Duan <duanxiongchun@bytedance.com> Cc: Yang Shi <shy828301@gmail.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Mar 16, 2022
-
-
Matthew Wilcox (Oracle) authored
Convert all callers; mostly this is just changing the aops to point at it, but a few implementations need a little more work. Signed-off-by:
Matthew Wilcox (Oracle) <willy@infradead.org> Tested-by:
Damien Le Moal <damien.lemoal@opensource.wdc.com> Acked-by:
Damien Le Moal <damien.lemoal@opensource.wdc.com> Tested-by: Mike Marshall <hubcap@omnibond.com> # orangefs Tested-by: David Howells <dhowells@redhat.com> # afs
-
- Mar 15, 2022
-
-
Matthew Wilcox (Oracle) authored
Remove special-casing of a NULL invalidatepage, since there is no more block_invalidatepage. Signed-off-by:
Matthew Wilcox (Oracle) <willy@infradead.org> Tested-by:
Damien Le Moal <damien.lemoal@opensource.wdc.com> Acked-by:
Damien Le Moal <damien.lemoal@opensource.wdc.com> Tested-by: Mike Marshall <hubcap@omnibond.com> # orangefs Tested-by: David Howells <dhowells@redhat.com> # afs
-
- Jan 20, 2022
-
-
Minghao Chi authored
Return value directly instead of taking this in a variable. Link: https://lkml.kernel.org/r/20211210023211.424609-1-chi.minghao@zte.com.cn Signed-off-by:
Minghao Chi <chi.minghao@zte.com.cn> Reported-by:
Zeal Robot <zealci@zte.com.cm> Cc: Christian Brauner <christian.brauner@ubuntu.com> Cc: Jan Kara <jack@suse.cz> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Jun 29, 2021
-
-
Christoph Hellwig authored
Remove the CONFIG_BLOCK default to __set_page_dirty_buffers and just wire that method up for the missing instances. [hch@lst.de: ecryptfs: add a ->set_page_dirty cludge] Link: https://lkml.kernel.org/r/20210624125250.536369-1-hch@lst.de Link: https://lkml.kernel.org/r/20210614061512.3966143-4-hch@lst.de Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by:
Jan Kara <jack@suse.cz> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Tyler Hicks <code@tyhicks.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Jan 24, 2021
-
-
Christian Brauner authored
Extend some inode methods with an additional user namespace argument. A filesystem that is aware of idmapped mounts will receive the user namespace the mount has been marked with. This can be used for additional permission checking and also to enable filesystems to translate between uids and gids if they need to. We have implemented all relevant helpers in earlier patches. As requested we simply extend the exisiting inode method instead of introducing new ones. This is a little more code churn but it's mostly mechanical and doesnt't leave us with additional inode methods. Link: https://lore.kernel.org/r/20210121131959.646623-25-christian.brauner@ubuntu.com Cc: Christoph Hellwig <hch@lst.de> Cc: David Howells <dhowells@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: linux-fsdevel@vger.kernel.org Reviewed-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
When file attributes are changed most filesystems rely on the setattr_prepare(), setattr_copy(), and notify_change() helpers for initialization and permission checking. Let them handle idmapped mounts. If the inode is accessed through an idmapped mount map it into the mount's user namespace. Afterwards the checks are identical to non-idmapped mounts. If the initial user namespace is passed nothing changes so non-idmapped mounts will see identical behavior as before. Helpers that perform checks on the ia_uid and ia_gid fields in struct iattr assume that ia_uid and ia_gid are intended values and have already been mapped correctly at the userspace-kernelspace boundary as we already do today. If the initial user namespace is passed nothing changes so non-idmapped mounts will see identical behavior as before. Link: https://lore.kernel.org/r/20210121131959.646623-8-christian.brauner@ubuntu.com Cc: Christoph Hellwig <hch@lst.de> Cc: David Howells <dhowells@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: linux-fsdevel@vger.kernel.org Reviewed-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Christian Brauner <christian.brauner@ubuntu.com>
-
- Sep 18, 2020
-
-
Al Viro authored
Get rid of boilerplate in most of ->statfs() instances... Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- Aug 23, 2020
-
-
Gustavo A. R. Silva authored
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by:
Gustavo A. R. Silva <gustavoars@kernel.org>
-
- Jun 24, 2020
-
-
Christoph Hellwig authored
Move the struct block_device definition together with most of the block layer definitions, as it has nothing to do with the rest of fs.h. Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
- Apr 20, 2020
-
-
Mauro Carvalho Chehab authored
Some filesystem references got broken by a previous patch series I submitted. Address those. Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Acked-by: David Sterba <dsterba@suse.com> # fs/affs/Kconfig Link: https://lore.kernel.org/r/57318c53008dbda7f6f4a5a9e5787f4d37e8565a.1586881715.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Jan 25, 2020
-
-
Dan Carpenter authored
This code accidentally returns success, but it should return the -EIO error code from adfs_fplus_validate_header(). Acked-by:
Russell King <rmk+kernel@armlinux.org.uk> Fixes: d79288b4 ("fs/adfs: bigdir: calculate and validate directory checkbyte") Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- Jan 21, 2020
-
-
Russell King authored
Avoid using the inode number as the indirect disc address, even though these currently have the same value. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Add support for ADFS E and E+ floppy image formats, which, unlike their hard disk variants, do not have a filesystem boot block - they have a single map zone, with the map fragment stored at sector 0. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Separate the filesystem block probing from the superblock filling so we can support other ADFS filesystem formats, such as the single-zone E and E+ floppy image formats which do not have a boot block. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Remove the noisy debug in adfs_dir_update(). Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
When we have write support enabled, we must not drop inodes before they have been written back, otherwise we lose updates to the filesystem on umount. Keep the inodes around unless we are built in read-only mode, or we are mounted read-only. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Implement big directory entry update support in the same way that we do for new directories. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
When reading a big directory, calculate the validate the directory checkbyte to ensure that the directory contents are valid. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Strengthen the directory validation by ensuring that the header fields contain sensible values that fit inside the directory, and limit the directory size to 4MB as per RISC OS requirements. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Extract the directory validation from the directory reading function as we will want to re-use this code. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Factor out the directory entry byte offset calculation. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
After changing a directory, we need to update the sequence numbers and calculate the new check byte before the directory is scheduled to be written back to the media. Since this needs to happen for any change to the directory, move this into a separate method. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
__adfs_dir_put() and adfs_dir_find_entry() are only called from adfs_f_update(), so move them into this function, removing some unnecessary entry copying by doing so. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
adfs_dir_read() is only called from adfs_f_read(), so merge it into that function. As new directories are always 2048 bytes in size, (which we rely on elsewhere) we can consolidate some of the code. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Check that the lastmask and reserved fields are all zero, as per the documentation. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
We have two locations where we validate the new directory format, so factor this out to a helper. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Add and use pointers in the adfs_dir structure to access the directory head and tail structures, which will always be contiguous in a buffer. This allows us to avoid memcpy()ing the data in the new directory code, making it slightly more efficient. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Rather than using setpos + getnext to iterate through the directory entries, pass iterate() down to the dir format code to populate the dirents. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
There is nothing in our readdir (aka iterate) method that relies on the directory inode being exclusively locked, so switch to using the iterate_shared() hook rather than iterate(). Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Get rid of the ifdef, using IS_ENABLED() instead to detect whether the code should be callable. This allows the compiler to always parse the following code, reducing the chances of errors being missed. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
When we update a directory, a number of errors may happen. If we failed to find the entry to update, we can just release the directory buffers as normal. However, if we have some other error, we may have partially updated the buffers, resulting in an invalid directory. In this case, we need to discard the buffers to avoid writing the contents back to the media, and later re-read the directory from the media. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Use __u8 and pack the structures for on-disk directories. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Update directory locking such that it covers the validation of the directory, which could fail if another thread is concurrently writing to the same directory. Since we may sleep, we need to use a rwsem rather than a rw spinlock. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Provide a helper for marking directory buffers dirty so they get written back to disk. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Add a helper to read a directory using the inode, which we do in two places. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Russell King authored
Both directory formats code the mechanics of fetching the directory buffers using their own implementations. Consolidate these into one implementation. Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-