From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Johannes Thumshirn <jth@kernel.org>,
Naohiro Aota <Naohiro.Aota@wdc.com>,
Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH v3 1/2] fs: New zonefs file system
Date: Wed, 25 Dec 2019 07:20:02 +0000 [thread overview]
Message-ID: <BYAPR04MB58167AD3E7519632746CDE72E7280@BYAPR04MB5816.namprd04.prod.outlook.com> (raw)
In-Reply-To: BYAPR04MB5816B3322FD95BD987A982C1E7280@BYAPR04MB5816.namprd04.prod.outlook.com
On 2019/12/25 15:05, Damien Le Moal wrote:
>>> + inode->i_mode = S_IFREG;
>>
>> i_mode &= ~S_IRWXUGO; ?
>
> Yes, indeed that is better. checkpatch.pl does spit out a warning if one
> uses the S_Ixxx macros though. See below.
Please disregard this comment. checkpatch is fine. For some reasons I
had warnings in the past but they are now gone. So using the macros
instead of the harder to read hard-coded values.
>
>>
>> Note that clearing the mode flags won't prevent programs with an
>> existing writable fd from being able to call write(). I'd imagine that
>> they'd hit EIO pretty fast though, so that might not matter.
>>
>>> + zone->wp = zone->start;
>>> + } else if (zone->cond == BLK_ZONE_COND_READONLY) {
>>> + inode->i_flags |= S_IMMUTABLE;
>>> + inode->i_mode &= ~(0222); /* S_IWUGO */
>>
>> Might as well just use S_IWUGO directly here?
Yes, I did in v4.
> Because checkpatch spits out a warning if I do. I would prefer using the
> macro as I find it much easier to read. Should I just ignore checkpatch
> warning ?
My mistake. No warnings :)
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2019-12-25 7:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-24 2:06 [PATCH v3 0/2] New zonefs file system Damien Le Moal
2019-12-24 2:06 ` [PATCH v3 1/2] fs: " Damien Le Moal
2019-12-24 4:40 ` Darrick J. Wong
2019-12-25 6:05 ` Damien Le Moal
2019-12-25 7:20 ` Damien Le Moal [this message]
2019-12-25 8:21 ` Damien Le Moal
2020-01-02 21:36 ` Darrick J. Wong
2020-01-03 0:08 ` Linus Torvalds
2019-12-24 2:06 ` [PATCH v3 2/2] zonefs: Add documentation Damien Le Moal
2019-12-25 1:33 ` Randy Dunlap
2019-12-25 2:57 ` Damien Le Moal
2019-12-25 6:40 ` Damien Le Moal
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=BYAPR04MB58167AD3E7519632746CDE72E7280@BYAPR04MB5816.namprd04.prod.outlook.com \
--to=damien.lemoal@wdc.com \
--cc=Naohiro.Aota@wdc.com \
--cc=darrick.wong@oracle.com \
--cc=hare@suse.de \
--cc=jth@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=torvalds@linux-foundation.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 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).