From: Dan Carpenter via Ocfs2-devel <ocfs2-devel@oss.oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [bug report] ocfs2/cluster: Pin/unpin o2hb regions
Date: Tue, 6 Jun 2023 11:22:57 +0300 [thread overview]
Message-ID: <ZH7s4RhMJUXzEeVV@moroto> (raw)
[ This is ancient code. - dan ]
fs/fs_context.c
168 {
169 int ret;
170
171 struct fs_parameter param = {
172 .key = key,
173 .type = fs_value_is_flag,
174 .size = v_size,
175 };
176
177 if (value) {
--> 178 param.string = kmemdup_nul(value, v_size, GFP_KERNEL);
^^^^^^^^^^
Sleeping
179 if (!param.string)
180 return -ENOMEM;
181 param.type = fs_value_is_string;
182 }
183
184 ret = vfs_parse_fs_param(fc, ¶m);
185 kfree(param.string);
186 return ret;
187 }
There are a couple OCFS functions which call this sleeping function
while holding a spinlock.
o2hb_heartbeat_group_drop_item() <- disables preempt
o2hb_region_inc_user() <- disables preempt
-> o2hb_region_pin()
-> o2nm_depend_item()
-> configfs_depend_item()
-> configfs_pin_fs()
-> simple_pin_fs()
-> vfs_kern_mount()
-> vfs_parse_fs_string()
fs/ocfs2/cluster/heartbeat.c
2338 static int o2hb_region_inc_user(const char *region_uuid)
2339 {
2340 int ret = 0;
2341
2342 spin_lock(&o2hb_live_lock);
Lock.
2343
2344 /* local heartbeat */
2345 if (!o2hb_global_heartbeat_active()) {
2346 ret = o2hb_region_pin(region_uuid);
This function starts the call tree to vfs_parse_fs_string().
2347 goto unlock;
2348 }
2349
regards,
dan carpenter
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
next reply other threads:[~2023-06-06 13:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 8:22 Dan Carpenter via Ocfs2-devel [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-01-19 11:29 [Ocfs2-devel] [bug report] ocfs2/cluster: Pin/unpin o2hb regions Dan Carpenter via Ocfs2-devel
2022-01-20 2:13 ` Joseph Qi via Ocfs2-devel
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=ZH7s4RhMJUXzEeVV@moroto \
--to=ocfs2-devel@oss.oracle.com \
--cc=dan.carpenter@linaro.org \
/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.