<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<br>
They do.  It’s probably gone unnoticed because those updates are mostly directly triggered by users or one time only during initialization, so there’s little risk of colliding.<br>
<br>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> lustre-devel <lustre-devel-bounces@lists.lustre.org> on behalf of NeilBrown <neilb@suse.com><br>
<b>Sent:</b> Monday, July 2, 2018 11:10:54 PM<br>
<b>To:</b> James Simmons; Andreas Dilger; Oleg Drokin<br>
<b>Cc:</b> Lustre Development List<br>
<b>Subject:</b> Re: [lustre-devel] [PATCH 05/18] lustre: llite: fast read implementation</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Mon, Jul 02 2018, James Simmons wrote:<br>
<br>
> +static ssize_t fast_read_store(struct kobject *kobj,<br>
> +                            struct attribute *attr,<br>
> +                            const char *buffer,<br>
> +                            size_t count)<br>
> +{<br>
> +     struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info,<br>
> +                                           ll_kobj);<br>
> +     bool val;<br>
> +     int rc;<br>
> +<br>
> +     rc = kstrtobool(buffer, &val);<br>
> +     if (rc)<br>
> +             return rc;<br>
> +<br>
> +     spin_lock(&sbi->ll_lock);<br>
> +     if (val)<br>
> +             sbi->ll_flags |= LL_SBI_FAST_READ;<br>
> +     else<br>
> +             sbi->ll_flags &= ~LL_SBI_FAST_READ;<br>
> +     spin_unlock(&sbi->ll_lock);<br>
<br>
This is a little odd... no other code uses ll_lock to protect updates to<br>
ll_flags.  Various other places (e.g. checksum_pages_store()) updates it<br>
unprotected.<br>
<br>
Maybe there all need to use ll_lock for protection.<br>
<br>
<br>
Thanks,<br>
NeilBrown<br>
</div>
</span></font></div>
</body>
</html>