Hi @Markbery2007,
For naturalisation is it enough to have been married to a German for two years, as long as you have altogether been in Germany for three years. This is covered in paragraph 9, section 1 of the nationality law (here via online translation):
https://***-gesetze--im--internet-de.translate.goog/stag/BJNR005830913.html?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp
The question of permanent residency isn't as clear to me. In my reading of the relevant legal paragraph, you are entitled to it now. This is because the law states that the spouse of a German is to be issued with permanent residency once the spouse has had a residence permit for three years and the couple continues to live together. It does not specify that the spouse needs to have had a particular permit for the three years.
The legal basis is paragraph 28, section 2 of the Residence Law (here via online translation):
https://***-gesetze--im--internet-de.translate.goog/aufenthg_2004/__28.html?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp
Your situation is quite specific and so if you are interested in having permanent residency, I recommend you apply for this in writing with the Ausländerbehörde (assuming you fulfill the other requirements in addition to the 3 years with a residence permit). The Ausländerbehörde then has to **** at your case in detail and give you a legal basis if they turn down your application.
Best,
Éanna