linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* basic questions regarding COW in Btrfs
@ 2013-02-20 17:28 Aastha Mehta
  2013-02-20 17:54 ` Josef Bacik
  0 siblings, 1 reply; 14+ messages in thread
From: Aastha Mehta @ 2013-02-20 17:28 UTC (permalink / raw)
  To: linux-btrfs

Hello,

I am trying to understand the COW mechanism in Btrfs. Is it correct to
say that unless nodatacow option is specified, Btrfs always performs
COW for all the data+metadata extents used in the system?

I saw that COWing is implemented in btrfs_cow_block() function, which
is called at the time of searching a slot for a particular item, while
inserting into a new slot, committing transactions, while creating
pending snapshots and few other places.

However, while tracing through the complete write path, I could not
quite figure out when extents actually get COWed. Could you please
point me to the place where COWing takes place? Is there any time
when, for performance or any other reasons, the extents are not COWed
but overwritten in place (apart from the explicit nodatacow flag being
set during mount)?

Thanks,
Aastha.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-03-05  1:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-20 17:28 basic questions regarding COW in Btrfs Aastha Mehta
2013-02-20 17:54 ` Josef Bacik
2013-02-21 17:32   ` Aastha Mehta
2013-02-23  9:33     ` Aastha Mehta
     [not found]     ` <CAEzrpqcGeiq=tHEvcH9625vZpCZaD94PrpjYO1_r4nS2GP9ByA@mail.gmail.com>
2013-02-25 15:15       ` Aastha Mehta
2013-02-25 17:27         ` Josef Bacik
2013-02-25 19:00           ` Aastha Mehta
2013-03-02 21:07             ` Alex Lyakas
2013-03-03 23:42               ` Josef Bacik
2013-03-03 15:41             ` Aastha Mehta
2013-03-03 23:52               ` Josef Bacik
2013-03-05  0:57                 ` Aastha Mehta
2013-03-05  1:51                   ` Josef Bacik
2013-03-05  1:55                     ` Aastha Mehta

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).