From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
<linux-kernel@vger.kernel.org>,
linux-acpi@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH 1/3] debugfs: Add .fsync() callback proxy support
Date: Thu, 14 Jul 2016 10:52:25 +0800 [thread overview]
Message-ID: <66cf2476a5b8c421055b8ccc07d6114b0a131d3e.1468464391.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1468464391.git.lv.zheng@intel.com>
This patch adds .fsync() callback for debugfs files.
ACPI AML debugger needs to implement this to flush cmds/logs.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/debugfs/file.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 592059f..f863a0c 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -172,6 +172,10 @@ FULL_PROXY_FUNC(unlocked_ioctl, long, filp,
PROTO(struct file *filp, unsigned int cmd, unsigned long arg),
ARGS(filp, cmd, arg));
+FULL_PROXY_FUNC(fsync, int, filp,
+ PROTO(struct file *filp, loff_t start, loff_t end, int datasync),
+ ARGS(filp, start, end, datasync));
+
static unsigned int full_proxy_poll(struct file *filp,
struct poll_table_struct *wait)
{
@@ -226,6 +230,8 @@ static void __full_proxy_fops_init(struct file_operations *proxy_fops,
proxy_fops->poll = full_proxy_poll;
if (real_fops->unlocked_ioctl)
proxy_fops->unlocked_ioctl = full_proxy_unlocked_ioctl;
+ if (real_fops->fsync)
+ proxy_fops->fsync = full_proxy_fsync;
}
static int full_proxy_open(struct inode *inode, struct file *filp)
--
1.7.10
next prev parent reply other threads:[~2016-07-14 2:52 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-14 2:52 [PATCH 0/3] ACPI / debugger: Add kernel flushing support Lv Zheng
2016-07-14 2:52 ` Lv Zheng [this message]
2016-07-19 8:13 ` [PATCH 1/3] debugfs: Add .fsync() callback proxy support Zheng, Lv
2016-07-14 2:52 ` [PATCH 2/3] ACPI / debugger: Add kernel flushing support Lv Zheng
2016-07-14 2:52 ` [PATCH 3/3] tools/power/acpi/acpidbg: Use new flushing mechanism Lv Zheng
2016-07-19 10:00 ` [PATCH v2 0/2] ACPI / debugger: Add kernel flushing support Lv Zheng
2016-07-19 10:00 ` [PATCH v2 1/2] " Lv Zheng
2016-07-21 13:43 ` Rafael J. Wysocki
2016-07-22 0:34 ` Zheng, Lv
2016-07-19 10:00 ` [PATCH v2 2/2] tools/power/acpi/acpidbg: Use new flushing mechanism Lv Zheng
2016-07-20 8:12 ` [PATCH] tools/power/acpi/tools/acpidbg: Add multi-commands support in batch mode Lv Zheng
2016-07-21 13:45 ` Rafael J. Wysocki
2016-07-22 0:26 ` Zheng, Lv
2016-07-22 4:16 ` [PATCH v3 0/3] ACPI / debugger: Add kernel flushing support Lv Zheng
2016-07-22 4:16 ` [PATCH v3 1/3] " Lv Zheng
2016-07-22 4:17 ` [PATCH v3 2/3] tools/power/acpi/acpidbg: Use new flushing mechanism Lv Zheng
2016-07-22 4:17 ` [PATCH v3 3/3] tools/power/acpi/acpidbg: Add multi-commands support in batch mode Lv Zheng
2016-07-26 11:01 ` [PATCH v4 0/3] ACPI / debugger: Add kernel flushing support Lv Zheng
2016-07-26 11:01 ` [PATCH v4 1/3] " Lv Zheng
2016-08-17 0:25 ` Rafael J. Wysocki
2016-08-17 2:39 ` Zheng, Lv
2016-07-26 11:01 ` [PATCH v4 2/3] tools/power/acpi/acpidbg: Use new flushing mechanism Lv Zheng
2016-08-17 0:29 ` Rafael J. Wysocki
2016-08-17 2:41 ` Zheng, Lv
2016-07-26 11:01 ` [PATCH v4 3/3] tools/power/acpi/acpidbg: Add multi-commands support in batch mode Lv Zheng
2016-08-17 0:30 ` Rafael J. Wysocki
2016-08-17 4:31 ` Zheng, Lv
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=66cf2476a5b8c421055b8ccc07d6114b0a131d3e.1468464391.git.lv.zheng@intel.com \
--to=lv.zheng@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rjw@rjwysocki.net \
--cc=zetalog@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).