From: Jaegeuk Kim <jaegeuk.kim@gmail.com>
To: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: "Arnd Bergmann" <arnd@arndb.de>, 김재극 <jaegeuk.kim@samsung.com>,
viro@zeniv.linux.org.uk, "'Theodore Ts'o'" <tytso@mit.edu>,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
chur.lee@samsung.com, cm224.lee@samsung.com,
jooyoung.hwang@samsung.com
Subject: Re: [PATCH 11/16] f2fs: add inode operations for special inodes
Date: Sun, 14 Oct 2012 16:09:05 +0900 [thread overview]
Message-ID: <1350198545.1915.233.camel@kjgkr> (raw)
In-Reply-To: <E4F29864-3D97-4839-BC4E-6DCFDAC5447C@dubeyko.com>
2012-10-14 (일), 02:21 +0400, Vyacheslav Dubeyko:
> On Oct 14, 2012, at 12:52 AM, Arnd Bergmann wrote:
>
> > On Friday 05 October 2012, 김재극 wrote:
> >> +const char *media_ext_lists[] = {
> >> + "jpg",
> >> + "gif",
> >> + "png",
> >> + "avi",
> >> + "divx",
> >> + "mp4",
> >> + "mp3",
> >> ...
> >
> >> + * Set multimedia files as cold files for hot/cold data separation
> >> + */
> >> +static inline void set_cold_file(struct inode *inode, const unsigned char *name)
> >> +{
> >> + const char **extlist = media_ext_lists;
> >> +
> >> + while (*extlist) {
> >> + if (!is_multimedia_file(name, *extlist)) {
> >> + F2FS_I(inode)->is_cold = 1;
> >> + break;
> >> + }
> >> + extlist++;
> >> + }
> >> +}
> >
> > This is a very clever way of categorizing files by their name, but I wonder if hardcoding
> > the list of file name extensions at in the kernel source is the best strategy. Generally
> > I would consider this to be a policy that should be configurable by the user.
> >
> > Unfortunately I can't think of a good interface to configure this, but maybe someone
> > else has a useful idea. Maybe the list can be stored in the superblock and get written
> > at mkfs time from the same defaults, but with the option of overriding it using
> > a debugfs tool.
> >
>
> By the way, how about extended attributes? It is possible to save in extended attribute a hint about file's content nature during creation operation or later. Moreover, extended attribute gives possibility to change hint after renaming operation, for example.
>
I think xattr is not a proper way to communicate between file system and
users.
How about fadvise()?
> With the best regards,
> Vyacheslav Dubeyko.
>
> > Arnd
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Jaegeuk Kim
Samsung
next prev parent reply other threads:[~2012-10-14 7:09 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-05 12:03 김재극
2012-10-06 18:59 ` Al Viro
2012-10-13 20:52 ` Arnd Bergmann
2012-10-13 21:57 ` Vyacheslav Dubeyko
2012-10-13 22:21 ` Vyacheslav Dubeyko
2012-10-14 7:09 ` Jaegeuk Kim [this message]
2012-10-14 12:06 ` Vyacheslav Dubeyko
2012-10-14 15:19 ` Arnd Bergmann
[not found] ` <CAN863PuYDSSFmaKtsVvdX4aFpS8hAMvFmhJpsky0x=ySn0QsqQ@mail.gmail.com>
2012-10-15 14:05 ` Arnd Bergmann
2012-10-16 2:29 ` Jaegeuk Kim
2012-10-16 16:14 ` Arnd Bergmann
2012-10-16 21:43 ` Jaegeuk Kim
2012-10-17 3:44 ` Jaegeuk Kim
2012-10-17 12:22 ` Arnd Bergmann
2012-10-17 8:35 ` Arnd Bergmann
2012-10-15 22:34 ` Dave Chinner
2012-10-16 2:00 ` Jaegeuk Kim
2012-10-16 11:38 ` Arnd Bergmann
2012-10-16 20:38 ` Jaegeuk Kim
2012-10-17 12:25 ` Arnd Bergmann
2012-10-18 5:37 ` Jaegeuk Kim
2012-10-16 20:44 ` Dave Chinner
2012-10-16 22:30 ` Jaegeuk Kim
2012-10-16 22:54 ` Dave Chinner
2012-10-17 3:25 ` Jaegeuk Kim
2012-10-17 12:50 ` Arnd Bergmann
2012-10-24 2:49 ` Dave Chinner
2012-10-24 12:02 ` Arnd Bergmann
2012-10-14 6:51 ` Jaegeuk Kim
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=1350198545.1915.233.camel@kjgkr \
--to=jaegeuk.kim@gmail.com \
--cc=arnd@arndb.de \
--cc=chur.lee@samsung.com \
--cc=cm224.lee@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=jaegeuk.kim@samsung.com \
--cc=jooyoung.hwang@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/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
Powered by JetHome