All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: loody <miloody@gmail.com>
Cc: NeilBrown <neilb@suse.de>, Linux-FSDevel <linux-fsdevel@vger.kernel.org>
Subject: Re: dummy file read periodically for external USB Hard Disk
Date: Fri, 18 Jul 2014 11:13:25 -0700	[thread overview]
Message-ID: <53C963C5.5090209@infradead.org> (raw)
In-Reply-To: <CANudz+vOiXTQnsfe=d==zQYFOtnQ=ye1HLdF2FdWJPEchfBNNA@mail.gmail.com>

On 07/18/2014 10:31 AM, loody wrote:
> hi Randy and All:
> 
>>
>> It means that the <buffer> still is not aligned to a 512-byte boundary.
>> Try
>>    char buffer[1024] __attribute__ ((aligned(1024)));
>>
>> Well, that is aligned to 1024 bytes, not 512, but whatever.
> the suggestion you gave to me works ^^
> is there any alignment check in kernel FS such that it will directly
> output to device instead of getting data from page cache?

Not sure that I understand your question, but I think that using
O_DIRECT in the open() call attempts to do what you are asking.

Please read 'man open' and search for O_DIRECT.

-- 
~Randy

  reply	other threads:[~2014-07-18 18:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-07 14:42 dummy file read periodically for external USB Hard Disk loody
2014-07-08  3:01 ` NeilBrown
2014-07-08  3:17   ` Dave Jones
2014-07-08 15:00   ` loody
2014-07-09 14:13   ` loody
2014-07-10  0:47     ` NeilBrown
2014-07-11  9:04       ` loody
2014-07-12  3:01         ` Randy Dunlap
2014-07-18 17:31           ` loody
2014-07-18 18:13             ` Randy Dunlap [this message]
2014-07-19 10:59               ` loody
2014-07-19 11:02               ` loody
2014-07-19 21:19                 ` Randy Dunlap

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=53C963C5.5090209@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miloody@gmail.com \
    --cc=neilb@suse.de \
    /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.