Skip to content

Commit 729437e

Browse files
committed
Merge tag 'for-linus-5.14-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux
Pull orangefs updates from Mike Marshall: "A read-ahead adjustment and a fix. The readahead adjustment was suggested by Matthew Wilcox and looks like how I should have written it in the first place... the "df fix" was suggested by Walt Ligon, some Orangefs users have been complaining about whacky df output..." * tag 'for-linus-5.14-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: fix orangefs df output. orangefs: readahead adjustment
2 parents 7a5e9a1 + 0fdec1b commit 729437e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

fs/orangefs/inode.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ static void orangefs_readahead(struct readahead_control *rac)
249249
{
250250
loff_t offset;
251251
struct iov_iter iter;
252-
struct file *file = rac->file;
253-
struct inode *inode = file->f_mapping->host;
252+
struct inode *inode = rac->mapping->host;
254253
struct xarray *i_pages;
255254
struct page *page;
256255
loff_t new_start = readahead_pos(rac);
@@ -269,14 +268,14 @@ static void orangefs_readahead(struct readahead_control *rac)
269268
readahead_expand(rac, new_start, new_len);
270269

271270
offset = readahead_pos(rac);
272-
i_pages = &file->f_mapping->i_pages;
271+
i_pages = &rac->mapping->i_pages;
273272

274273
iov_iter_xarray(&iter, READ, i_pages, offset, readahead_length(rac));
275274

276275
/* read in the pages. */
277276
if ((ret = wait_for_direct_io(ORANGEFS_IO_READ, inode,
278277
&offset, &iter, readahead_length(rac),
279-
inode->i_size, NULL, NULL, file)) < 0)
278+
inode->i_size, NULL, NULL, rac->file)) < 0)
280279
gossip_debug(GOSSIP_FILE_DEBUG,
281280
"%s: wait_for_direct_io failed. \n", __func__);
282281
else

fs/orangefs/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static int orangefs_statfs(struct dentry *dentry, struct kstatfs *buf)
209209
buf->f_bavail = (sector_t) new_op->downcall.resp.statfs.blocks_avail;
210210
buf->f_files = (sector_t) new_op->downcall.resp.statfs.files_total;
211211
buf->f_ffree = (sector_t) new_op->downcall.resp.statfs.files_avail;
212-
buf->f_frsize = sb->s_blocksize;
212+
buf->f_frsize = 0;
213213

214214
out_op_release:
215215
op_release(new_op);

0 commit comments

Comments
 (0)