From: Valerie Aurora <val@versity.com>
To: rpdfs-devel@lists.linux.dev
Subject: [PATCH 1/6] rpdfs: add rpdfs_file_llseek
Date: Thu, 7 May 2026 15:21:48 +0200 [thread overview]
Message-ID: <20260507132153.1161324-2-val@versity.com> (raw)
In-Reply-To: <20260507132153.1161324-1-val@versity.com>
Use generic_file_llseek to implement file seek.
Signed-off-by: Valerie Aurora <val@versity.com>
---
fs/rpdfs/file.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/fs/rpdfs/file.c b/fs/rpdfs/file.c
index 22532d8cdf63..e8918e38b3fe 100644
--- a/fs/rpdfs/file.c
+++ b/fs/rpdfs/file.c
@@ -5,10 +5,28 @@
#include "file.h"
#include "inode.h"
+static loff_t rpdfs_file_llseek(struct file *file, loff_t offset, int whence)
+{
+ struct inode *inode = file->f_inode;
+ struct rpdfs_fs_info *rfi = RPDFS_INODE_FS(inode);
+ struct rpdfs_block_handle *hnd = NULL;
+ int ret;
+
+ ret = rpdfs_inode_acquire(rfi, NULL, inode, &hnd, 0);
+ if (ret < 0)
+ goto out;
+
+ ret = generic_file_llseek(file, offset, whence);
+out:
+ rpdfs_block_release(rfi, &hnd);
+ return ret;
+}
+
const struct inode_operations rpdfs_file_iops = {
.getattr = rpdfs_getattr,
.setattr = rpdfs_setattr,
};
const struct file_operations rpdfs_file_fops = {
+ .llseek = rpdfs_file_llseek,
};
--
2.49.0
next prev parent reply other threads:[~2026-05-07 13:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 13:21 [PATCH 0/6] File data read/write version 2 Valerie Aurora
2026-05-07 13:21 ` Valerie Aurora [this message]
2026-05-07 13:21 ` [PATCH 2/6] rpdfs: add inode change debugging routine Valerie Aurora
2026-05-07 13:21 ` [PATCH 3/6] rpdfs: add basic file data initialization Valerie Aurora
2026-05-07 13:21 ` [PATCH 4/6] rpdfs: add file data allocation and lookup routines Valerie Aurora
2026-05-07 13:21 ` [PATCH 5/6] rpdfs: add rpdfs_write_iter/rpdfs_read_iter Valerie Aurora
2026-05-07 13:21 ` [PATCH 6/6] rpdfs: add read_folio, dirty_folio, write_begin, write_end Valerie Aurora
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260507132153.1161324-2-val@versity.com \
--to=val@versity.com \
--cc=rpdfs-devel@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.